本文介绍了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

推荐答案



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

07-31 11:02