网站默认文档被安全限制拒绝?
我有一个托管在 winhost.com 上的 ASP.Net 4.0 网站。
默认文档是index.html。在浏览器地址栏中,如果我输入
http://www.mysite.com/index.html
它工作正常 - 我根据需要得到了 index.html 页面。
但是,如果我只是输入 http://www.mysite.com,则
该网站的行为就像我请求了页面只允许经过身份验证的用户访问,也就是说,我会自动重定向到 Login.aspx 页面。
显然,这是一场重大恐慌!这意味着除非指示访问者包含“index.html”,否则网站的正常面向公众的部分将不再可见。
在 IIS 中,我已验证“默认文档”是index.html,并且它位于列表中的第一个。
在 web.config 中,我尝试添加
<location path="index.html">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
但这没有帮助。
这一切都是在我将网站从 2.0 转换为 4.0 时发生的。我忙于解决所有其他问题(ajax 安全性、错误版本的 dll 等),以至于我从未注意到这个问题。看起来应该很容易修复,但我很困惑。感谢您的帮助!
I have an ASP.Net 4.0 website hosted at winhost.com.
The default document is index.html. In the browser address bar, if I enter
http://www.mysite.com/index.html
it works fine - I get the index.html page as desired.
If, however, I simply enter http://www.mysite.com
the site behaves as if I have requested a page allowed only to authenticated users, that is, I am automatically redirected to the Login.aspx page.
Obviously this is a major panic! It means that the normal, public facing portion of the site is no longer visible unless visitors are instructed to include "index.html".
In IIS, I have verified that the "Default Document" is index.html, and it is first in the list.
In the web.config, I tried adding
<location path="index.html">
<system.web>
<authorization>
<allow users="?" />
</authorization>
</system.web>
</location>
But that did not help.
This all happened when I converted the site from 2.0 to 4.0. I was so busy fixing all the other problems (ajax security, wrong versions of dlls, etc.) that I never noticed this problem. Seems like it should be simple to fix, but I am stumped. Thanks for any help!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
检查您的网站所在的文件夹的 NTFS 权限。并将其与“index.htm”文件权限进行比较。某些用户帐户必须丢失。
Check the NTFS permissions for the folder, where your website is located. And compare it with "index.htm" file permissions. Some user account must be missing.