I’m trying to deploy a default mvc3 intranet project with medium trust level on a locally installed IIS 7.5 on a Windows 7 premium SP1.
The app is using the defaultApplicationPool with an .net4 integrated pipeline.
I only changed one setting: in web.config I added the trust level=”Medium” element.
Ran it in VS web express with the built-in aspnet dev. server. It works and I got the username properly displayed as expected.
I then used webdeploy, also with all the default settings to deploy it to my local IIS 7.5.
The first error I got is an access denied (401.2 unauthorized: logon failed due to server configuration).
However, if I remove the ‘deny anonymous users’ rule from the .net authorisation view, I get the home page but with an empty ‘user’ context.
I suspect this is caused by an IIS configuration setup but I don’t know where to start troubleshooting this problem, assuming this kind of setup is even possible on my Win7 premium non-domain based machine.
So, If any IIS 7.5 expert could point me in the right direction, I would be very grateful.
Thank you.
I found the answer myself, it turns out it was a two-step solution in my case:
1)I removed the ‘disallow anonymous users’ rule in the net authorization section
2) I enabled basic authentication in the authentication-section. This last one has given me a lot of problems because the ‘basic authentication’ feature was not installed by default on my machine. Once I installed the feature, I could enable basic authentication for the web application and everything worked like a charm.