IIS 7.5 MVC要求身份验证来获得静态文件 [英] IIS 7.5 MVC requires authentication to get static files

查看:121
本文介绍了IIS 7.5 MVC要求身份验证来获得静态文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚安装了Windows 7,我试图让我的MVC应用程序是在IIS 7个工作IIS 7.5中的工作。

我的问题是,当它试图加载任何静态文件(CSS,GIF,JPG ...)它需要验证。所以,如果我尝试去

  http://mydomain.com/Content/site.css

据重定向到

  http://mydomain.com/Account/LogIn?ReturnUrl=/Content/site.css


解决方案

我最终找到了问题。看来,我需要的IIS_USRS&放大器; IUSR帐户具有读取权限。我敢肯定,在Vista中我只用了IIS_USRS帐户。

I've just installed windows 7 and i'm trying to get my mvc app 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://mydomain.com/Content/site.css

It redirects to

http://mydomain.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.

这篇关于IIS 7.5 MVC要求身份验证来获得静态文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆