Setting up Reverse Proxy for Web Api in IIS

Say, you are are working on a web application that includes Web Api and a client component, such as Angular.  It is time for you to deploy the app onto front facing web server in DMZ.  Your friendly security guy comes over and say “You cannot reach into our database server from DMZ.  Figure something …

Continue reading ‘Setting up Reverse Proxy for Web Api in IIS’ »

Testing Routes for Web Api Controllers

In this post I will describe in detail how to perform integration tests on Web Api controllers, including routes and authentication.  I am going to use the same Angular MVC application I used in many of my Angular posts.  In this application I use Structure Map dependency resolution, but the same testing approach will apply …

Continue reading ‘Testing Routes for Web Api Controllers’ »

Building Recursive Interfaces in Angular and Entity Framework

I had an interesting problem to study today.  The business problem is quite simple.  I want to allow users to enter a number of items on a screen that are recursively related.  To illustrate here is what I have in mind Item 1 Item 1.1 Item 1.2 Item 1.2.1 Etc.. I do not want to …

Continue reading ‘Building Recursive Interfaces in Angular and Entity Framework’ »

Leveraging Forms Authentication in Web Api

Web Api technology is not like ASP.NET MVC, even though the two are often used together.  Although most people probably host Web Api inside IIS, and I do as well, Web Api does not take dependency on System.Web or IIS.  This allows you to self-host Web Api 2.0 application in your own process, such as …

Continue reading ‘Leveraging Forms Authentication in Web Api’ »

Building Pagination Directive in Angular and Twitter Bootstrap

One thing that every business app eventually needs is an ability to search for something and show results using paging.  The reason for that is that too many rows in search result set can bring any application to its knees.  Hence, you should always page search results.  If you are building a web application, there …

Continue reading ‘Building Pagination Directive in Angular and Twitter Bootstrap’ »

Building Dynamic Menu with Angular JS, Web Api and ASP.NET MVC

First I would like to talk about using MVC views (CSHTML files) for Angular views.  In my option, I like powerful features that MVC views bring to the table.  I can for example, use my models to generate input controls and validation messages on the server automatically.  More on that subject in subsequent posts.  I …

Continue reading ‘Building Dynamic Menu with Angular JS, Web Api and ASP.NET MVC’ »