RedirectFromLoginPage
From: Murphy (murphy_at_murphy.com)
Date: 04/12/04
- Next message: Hernan de Lahitte: "Re: CAS - Determine if an assembly has FullTrust"
- Previous message: Michel Gallant: "CMS/PKCS #7 signed messages and PKCS #1 signatures"
- Next in thread: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Reply: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 12 Apr 2004 09:12:15 +1000
I am trying to code a workaround to avoid being redirected to default.aspx
if the ReturnURL parameter is blank when the RedirectFromLoginPage method is
called.
Depending upon the login status the login button performs either a login or
logout and the appropriate image is displayed, see below:
'*******************************************************
' Displays the applicable image
'*******************************************************
Sub Page_Load(ByVal sender As Object, ByVal e As EventArgs)
If Request.IsAuthenticated = true Then
imgSignInOut.ImageUrl="images/signout.gif"
End If
End Sub
Interestingly before I altered the code and simply used the code below after
the user completed a login everything worked perfectly:
FormsAuthentication.RedirectFromLoginPage(customerId,
RememberLogin.Checked)
If I check the value of ReturnUrl and do a manual redirect if blank using
the code below Request.IsAuthenticated remains false and as a result the
page load event above always displays the login image...
If Request.QueryString("ReturnUrl") ="" Then
Response.Redirect("./")
Else
FormsAuthentication.RedirectFromLoginPage(customerId,
RememberLogin.Checked)
End if
Any ideas ?
Thanks
Murphy
- Next message: Hernan de Lahitte: "Re: CAS - Determine if an assembly has FullTrust"
- Previous message: Michel Gallant: "CMS/PKCS #7 signed messages and PKCS #1 signatures"
- Next in thread: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Reply: Michael Giagnocavo [MVP]: "Re: RedirectFromLoginPage"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]