更新时间:2023-09-20 11:27:10
在网站根目录中的web.config文件中,如果您添加:
In your web.config file in the root of your site, if you add:
<location path="relativePathToDir">
<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>
</location>
这对我来说是使用FormsAuthentication的,如果未通过身份验证,用户将被重定向到默认登录页面
This is working for me using FormsAuthentication, the user gets redirected to the default login page if not authenticated