RE: 401 with Forms Authentication and Roles
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Mon, 20 Aug 2007 01:22:08 GMT
Thanks for your followup Chuck,
As for the following question you mentioned:
===========
Say to change the logged in user to a
different user, you would also get redirected.
===========
In my login page, I can use "Request.QueryString["ReturnUrl"] != null" to
detect whether it is visited due to unauthorized, therefore, if you
manually or intentionaly visit the login page(there is no such a
querystring item), it won't automatically redirect you, doesn't it?
protected void Page_Load(object sender, EventArgs e)
{
if (Context.User.Identity.IsAuthenticated == true &&
Request.QueryString["ReturnUrl"] != null)
{
Server.Transfer("~/AccessDeniedPage.aspx");
}
..................
<<<<<<<<<<<<<<<<<<<<<<
Anyway, glad that you've got it working and thanks for sharing your
experience.
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
.
- References:
- RE: 401 with Forms Authentication and Roles
- From: Steven Cheng[MSFT]
- RE: 401 with Forms Authentication and Roles
- From: Steven Cheng[MSFT]
- RE: 401 with Forms Authentication and Roles
- From: Steven Cheng[MSFT]
- RE: 401 with Forms Authentication and Roles
- Prev by Date: Re: Problem deploying forms authorization
- Next by Date: Re: Problem deploying forms authorization
- Previous by thread: RE: 401 with Forms Authentication and Roles
- Next by thread: Padding is invalid and cannot be removed.
- Index(es):
Relevant Pages
|
|