ASP.NET Forms Authentication Problem(s)...

Discussion in 'ASP .Net' started by Mr.KisS, Jul 11, 2004.

  1. Mr.KisS

    Mr.KisS Guest

    Hi,

    I'm working with ASP.NET 2 (VWD). I have a Login page and a
    folder to protect. I have a Database which contains
    usernames & passwords.
    The problem is that when i go to the protected folder it
    automatically redirects me to the LOgin page with the rfeer
    url. And when i login with false informations, its show me
    the error panel. BUT, when i enter good informations, it
    reloads the Login page as i've just arrived instead of
    redirect me with authed cookie to the protected folder...
    Any ideas? (sources codes after =>)

    In my web.config i have this code to protect the fodler :
    ____
    <system.web>
    <authentication mode= "Forms">
    <forms name=".WIZOUAUTH" loginUrl="Login.aspx"/>
    </authentication>
    </system.web>

    <location path="members/">
    <system.web>
    <authorization>
    <deny users="*" />
    </authorization>
    </system.web>
    </location>
    ____

    Login.aspx :
    (IsGoodUser is works fine, it's the func which return if
    the user exists and the password is good or not).
    ____
    void btnLogin_Click(object sender, EventArgs e)
    {
    if (IsGoodUser(boxLogin.Text, boxPwd.Text) == true)
    {

    FormsAuthentication.RedirectFromLoginPage(boxLogin.Text, true);
    }
    else
    {
    pnlLogin.Visible = false;
    pnlLogin.Enabled = false;
    pnlError.Visible = true;
    pnlError.Enabled = true;
    }
    }
    ____

    Regards.
     
    Mr.KisS, Jul 11, 2004
    #1
    1. Advertising

  2. "Mr.KisS" <> wrote in message
    news:2b33901c46755$3ebd9730$...
    > Hi,
    >
    > I'm working with ASP.NET 2 (VWD). I have a Login page and a
    > folder to protect. I have a Database which contains
    > usernames & passwords.
    > The problem is that when i go to the protected folder it
    > automatically redirects me to the LOgin page with the rfeer
    > url. And when i login with false informations, its show me
    > the error panel. BUT, when i enter good informations, it
    > reloads the Login page as i've just arrived instead of
    > redirect me with authed cookie to the protected folder...
    > Any ideas? (sources codes after =>)
    >
    > In my web.config i have this code to protect the fodler :
    > ____
    > <system.web>
    > <authentication mode= "Forms">
    > <forms name=".WIZOUAUTH" loginUrl="Login.aspx"/>
    > </authentication>
    > </system.web>
    >
    > <location path="members/">
    > <system.web>
    > <authorization>
    > <deny users="*" />
    > </authorization>
    > </system.web>
    > </location>


    Try <deny users="?" />
    --
    John Saunders
    johnwsaundersiii at hotmail
     
    John Saunders, Jul 11, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Brett Porter
    Replies:
    2
    Views:
    791
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  2. Eric
    Replies:
    2
    Views:
    1,542
    Tommy
    Feb 13, 2004
  3. Brett Porter
    Replies:
    2
    Views:
    216
    Andrea D'Onofrio [MSFT]
    Jan 20, 2004
  4. Eric
    Replies:
    2
    Views:
    605
  5. Michael D. Ober
    Replies:
    6
    Views:
    309
    Michael D. Ober
    Oct 30, 2006
Loading...

Share This Page