IIS 7.5 MVC requires authentication to get static files

别说谁变了你拦得住时间么 提交于 2019-12-04 01:29:52

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.

It looks like you've messed up with something.

If you take the ASP.NET MVC template application (the one created when you start a new MVC Project), it won't require authorization to download static content.

If you provide more information, like your routes, or something else, it will be easier to understand your problem and find a solution for it.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!