ASP.NET Default.aspx页面允许匿名用户 [英] ASP.NET Default.aspx page allowing anonymous user

查看:97
本文介绍了ASP.NET Default.aspx页面允许匿名用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个简单的ASP.NET登录页面。我拒绝匿名用户登录到我在web.config文件中创建的名为content的文件夹。



lt; location path =" content"> ;



< system.web>

< authorization>

< deny users =" ?" />

< / authorization>

< /system.web>



< / location>



当我运行程序并登录时页面打开正常



http :// localhost:6409 / Browsercloseendsession / content / Default.aspx



当我退出时它会指向



http:// localhost:6409 / Browsercloseendsession / login.aspx



但是当我按下浏览器的后退按钮时,再次打开



http:// localhost:6409 / Browsercloseendsession / content / Default.aspx



而不是将其带到登录页面。



如何纠正它?请帮助

I created a simple ASP.NET Login page. I denied anonymous users from logging on to a folder called "content" which I created in the web.config file.

lt;location path="content">

<system.web>
<authorization>
<deny users="?"/>
</authorization>
</system.web>

</location>

When I run the program and login then the page opens fine

http://localhost:6409/Browsercloseendsession/content/Default.aspx

When I logout it directs to

http://localhost:6409/Browsercloseendsession/login.aspx

But when I press the back button of the browser.it again opens the

http://localhost:6409/Browsercloseendsession/content/Default.aspx

instead of taking it to the login page.

How to correct it? Please help

推荐答案

阅读 - 注销后的浏览器返回按钮问题 [ ^ ]。


找到了家伙!问题出在登录状态。它应设置为LogoutAction到Refresh而不是RedirectToLoginPage。但为什么会这样?。
Found out guys ! The problem was with "Login Status". It should be set to "LogoutAction" to "Refresh" instead of "RedirectToLoginPage". But why is that ?.


这篇关于ASP.NET Default.aspx页面允许匿名用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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