RedirectFromLoginPage: Returns to login page.

From: Tim Murphy (news_at_msolutions.com.au)
Date: 09/26/05


Date: Mon, 26 Sep 2005 23:08:26 +1000

I'm using the following code in my login.aspx page to validate a user. The
FormsAuthentication.RedirectFromLoginPage(cUser,bPersistent) gets called but
login.aspx gets redisplayed instead of returning to the calling page. If I
change the address line in IE to the calling page I can see the new user has
been logged.

I'm using Windows 2000 Pro + ASP.Net 1.1.

Any ideas what the problem is?

Tim

<script language="VB" runat="server">

Sub ProcessLogin(objSender As Object, objArgs As EventArgs)

 Dim cUser As String
 Dim cPassword As String
 Dim bPersistent As Boolean

 cUser = txtUser.Text
 cPassword = txtPassword.Text
 bPersistent = chkPersistLogin.Checked

 ' This is were I should compare to the database.
 If True Then
  FormsAuthentication.RedirectFromLoginPage(cUser,bPersistent)
 Else
  ErrorMessage.InnerHtml = "<b>Something went wrong...</b> please re-enter
your credentials..."
 End If

End Sub

</script>



Relevant Pages

  • Re: RedirectFromLoginPage: Returns to login page.
    ... Tim ... > Dim cPassword As String ... > Dim bPersistent As Boolean ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: RedirectFromLoginPage: Returns to login page.
    ... and if IE sends the cookie on subsequent requests. ... > Dim cPassword As String ... > Dim bPersistent As Boolean ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: shorts and longs
    ... >> according to the tif file specs, the compression tag stores ... when i Dim m_Compression as Integer and the return value is ... What are you calling that is giving you the return value and ...
    (microsoft.public.vb.general.discussion)
  • Re: shorts and longs
    ... > according to the tif file specs, the compression tag stores ... when i Dim m_Compression as Integer and the return value is ... What are you calling that is giving you the return value and ...
    (microsoft.public.vb.general.discussion)
  • Re: Can I Make This Computation Shorter?
    ... It works for me in XL97 without a range, calling it as =SquareIt, ... Dim x As Long ... Price = stock price ... can I go one step further and directly calculate sum ...
    (microsoft.public.excel.misc)