We have a simple intranet site in MVC3 and entity infrastructure. Everything works fine for debugging with visual studio. When I publish the site on my local IIS7.5 web server box or in the developer's block in the same domain, then I will be asked to enter a username and password, and it will not connect to the site. It simply returns error 401.1 and shows with curiosity
Logon Method Not yet determined Logon User Not yet determined
I checked that Windows authentication is enabled and anonymous authentication is disabled. the application uses applicationPoolIdentity, but I tried it using network services without any differences. Webconfig includes
<authentication mode="Windows" />
and I tried it with and without an authorization section.
<authorization> <allow users="*" /> </authorization>
The only other thing I found on the Internet is related to changing the registry entry, but ultimately it will be on the production server, so itβs not convenient for me to make registry changes just for that.
executed locally with this code block, returns all expected information
<div id="title"> <h4> Environment.UserName: @Environment.UserName @DateTime.Now.Millisecond.ToString() </h4> @foreach (var role in Roles.GetRolesForUser()) { role.ToString(); <br /> } </div> <div id="logindisplay"> Context.User.Identity.Name <strong>@Context.User.Identity.Name</strong>!<br /> @Environment.UserDomainName </div>
This is an MVC3 web application. IIS authentication switches are
Anonymous Authentication Disabled ASP.NET Impersonation Disabled Forms Authentication Disabled Windows Authentication Enabled
Any other ideas or things that I am missing?
Brian source share