问题描述
大家好
我有一个Web应用程序.
我使用了Forms身份验证,并将Login.aspx设置为登录URL.
因此,当我尝试在地址栏中输入其他任何页面网址时,Iam会根据其设置重定向到登录"页面.
但是现在我需要在Login.aspx页面中提供一个名为 Register 的链接.
单击注册"链接应将我带到Register.aspx页面.
但是根据身份验证设置,我将重定向到登录"页面.
那么,有什么方法可以从此身份验证设置中忽略或退出register.aspx页吗?
在此先感谢您.
Hi every one
I have a web application.
I used Forms authentication and set Login.aspx as the Login url.
So when I try to enter any other page url in my address bar Iam redirected to Login page as per its setting.
But now I need to give a link called Register in Login.aspx page.
Clicking on Register link should take me to Register.aspx page.
But as per authentication settings I am redirected to Login page.
So is there a way to omit or escape the register.aspx page from this authentication setting?
Thanks in advance.
推荐答案
<location allowOverride="true" path="Register.aspx">
<system.web>
<authorization>
<allow users="*" />
</authorization>
</system.web>
</location>
如果正确,请接受答案
Accept answer if it is correct
<location path="File Path">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
这篇关于如何从ASP.NET身份验证中省略或转义页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!