Authenticating With A Custom Claims-Based Identity

by 

|

in

In one of our recent projects, we were managing data back and forth between two websites: one set up for an intranet with Active Directory authentication and the other set up to face external traffic with Identity authentication. In the project, a need arose to authenticate a user from the Active Directory intranet site on…

Read more…

Looking Back and Looking Ahead

by 

|

in

As we were looking back over the blog’s 2012 stats, I was struck (and humbled, honestly) at how many visitors we’ve received and the attention certain posts had garnered. Our five most popular posts in 2012 were: Ganz’s ClickOnce Publish and Deploy from Team Foundation Server 2010 Santi’s Developing Reports for SQL Server Reporting Services…

Read more…

Posting JSON Data to an MVC Controller via Ajax

by 

|

in

Form posts are a thing of the past. Most new interactive HTML5-Web 2.0-buzzword web apps are trending towards a one-page UI with Ajax requests used to pull and push data dynamically. So if you are doing a cool new web app that does not use any form posts, why would you make your Ajax posts…

Read more…

That Pesky “Requested Resource Does Not Support HTTP Method ‘POST’” Error When Using MVC Web API

by 

|

in

While working on a project that involved MVC Web API, I ran into a strange issue. I created my controller, registered my routes and decorated my methods with “[HttpPost]”, but the application would still not allow me to do POST requests to my method (HTTP 405 – Method not allowed. The requested resource does not…

Read more…

Testing Session in MVC in Four Lines of Code

by 

|

in

Controller testing in the model-view-controller (MVC) is simple. ?The level of difficulty is increased with the use of Session in the controller, but only slightly. In this post I show how to simply test controllers which use Session. Let’s try testing this controller method: The following code (in a test project) will throw a null…

Read more…