I did the following:
Create in VS 2012 a MVC 4.0 Application with the Intranet template, switch WindowsAuthentication on. Project can be started and shows Home page.
Then I added under References WebMatrix.WebData and set Copy Local true.
Starting the Application then returns a 404 Error indicating Requested Url: /login.aspx
Strange, isn't it?
I would like to use SimpleMembership Provider but if I cannot even reference the DLL this doesnt convince me.
Can anyone help me up?
MVC4 Intranet Project template provides a web.config with:
For some reason unknown to me, just adding the Microsoft ASP.Net Web Pages 2 Nuget Package to a Web App generated from MVC 4 Intranet Project template changes the routing behaviour of the whole application such that /login.aspx becomes the default routing when no controller/action is specified.
This is the defaultUrl default value defined for forms authentication, see forms-Element definition for details.
The following two bypasses work:
Change Route Map by adding something like
into Route table.
Modify web.config to contain
where the forms element provides the proper start page.
Either works. The latter seems more agreeable to me.