I have a Web application deployed to Windows Server 2008 R2 with IIS 7.5. The application is ASP.NET MVC 3 with .Net Framework 4.0.
Authentication Settings: Anonymous and Forms Authentication is enabled. I've set the Anonymous user identity value under the Anonymous properties to point to "Application pool Identity" instead of a specific user.
Web.Config
When trying to remotely access the application from my machine, I get the message "401 - Unauthorized: Access is denied due to invalid credentials." when accessing the "Account/Logon" page.
I have no problems accessing the app on my local machine through visual studio. I can also access the app on the Windows 2008 Server without any issues. Only when I try to access the app on the server from my local machine do I get the problem.
Any ideas?
Some additional Notes: - It's failing before I get to the login screen.
I've set the Anonymous user identity value under the Anonymous properties to point to "Application pool Identity" instead of a specific user.
Try setting it back to original IUSR
and make sure IUSR_YourComputerName
user has access to site's files/folder
Quoting from that article:
IIS 7 was difficult for figuring out why i was getting the 401 - Unauthorized: Access is denied due to invalid credentials... until i did this...
1.) Open iis and select the website that is causing the 401
2.) Open the "Authentication" property under the "IIS" header
3.) Click the "Windows Authentication" item and click "Providers"
4.) For me the issue was that Negotiate was above NTLM. I assume that there was some kind of handshake going on behind the scenes, but i was never really authenticated. I moved the NTLM to the top most spot, and BAM that fixed it.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.