I am running Win 7, IIS 7.0, VS2012
I have created asp.mvc4 web app
I have ADFS2.0 on a separate VM
Using the Identity and Access tools in VS 2012
I select use a business identity provider (e.g.ADFS2) and type the url to the STS metadata document.
https://server.local/federationmetadata/2007-06/federationmetadata.xml
edited the web config
<system.web>
...
<httpModules>
...
<remove name="FormsAuthentication" />
</httpModules>
</system.web>
and this
<system.webServer>
...
<modules>
...
<remove name="FormsAuthentication" />
</modules>
</system.webServer>
Also have checked that Windows Authentication was disabled for the project
The website redirects to a url like this http:// localhost /WebSite/login.aspx?ReturnUrl=%2fWebSite%2f which has a ‘The resource cannot be found’ error.
What else do I have to fiddle with to make this work?
The Microsoft doco is lightweight http://blogs.msdn.com/b/vbertocci/archive/2012/03/15/windows-identity-foundation-tools-for-visual-studio-11-part-iii-connecting-with-a-business-sts-e-g-adfs2.aspx
I already have had similar problems with the local development STS MS Identity and Access Tool MVC 4
Ok this has taken me days to work out but these were the things I did to get it running. There is much more to do.
Prerequisites:
On the Development Workstation
In your MVC4 Project
Add the following code to your project
On the ADFS 2.0 Server
Add some custom rules
MVC4 needs these rules in order to make a usable ClaimsPrincipal
Add a pass-through rule on the Name property.
And these 2 custom rules