I have just installed windows 7 and I'm trying to get my MVC application that was working in IIS 7 working in IIS 7.5.
The problem I have is that when it tries to load any static files (css, gif, jpg...) it requires authentication. So if I try to go to:
http://example.com/Content/site.css
It redirects to:
http://example.com/Account/LogIn?ReturnUrl=/Content/site.css
I ended up finding the problem. It seems that i need the IIS_USRS & IUSR accounts to have read access. I'm sure in vista i only had the IIS_USRS account.
For me it ended up being specific static content files that required authentication, while other static content files did not require it. Turns out that those files were green in Windows Explorer. I went to properties, Advanced, on the files and turned off "Encrypt contents to secure data" and my problem was solved.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With