How to protect static content on IIS7 in Classic Mode?

女生的网名这么多〃 提交于 2019-12-24 06:34:09

问题


I know how to protect my static (HTML) pages in IIS6, and how to do it using the IIS7 Integrated Pipeline, but how can I protect my HTML pages from unauthorised access in IIS7 when running in Classic Mode?

It's an ASP.NET site using forms authentication.


回答1:


ASP.NET forms authentication has nothing to do with resources that aren't handled by ASP.NET, like HTML files. Two options:

1) Tell ASP.NET to handle the static file types you are concerned with (HTML, etc)
2) Disable anonymous access for your site

But now you've got me curious... how does this change with IIS7 Integrated Pipeline vs Classic mode?




回答2:


IIS Classic Mode is the same as IIS6, except you can't use the IIS manager interface to do it; you have to edit web.config directly. See this guide for details.



来源:https://stackoverflow.com/questions/1644546/how-to-protect-static-content-on-iis7-in-classic-mode

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