Re: Forms Authentication & Code-Behind question
From: Stephen Barrett (stephen_barrett@nospam.aoncons.com)
Date: 07/24/02
- Next message: Bob Leano: "CyrptProtectData"
- Previous message: Stephen Barrett: "Re: Forms based security without cookies?"
- In reply to: Mark Hughes: "Forms Authentication & Code-Behind question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
From: "Stephen Barrett" <stephen_barrett@nospam.aoncons.com> Date: Wed, 24 Jul 2002 16:36:20 -0400
I have found that you get a null redirect url if you call your loginUrl
directly as the start page. Is this your problem?
"Mark Hughes" <markh@aquaonline.com> wrote in message
news:OUVeEmxLCHA.2552@tkmsftngp08...
> Hi all,
>
> I have the following directory structure:
> <root>
> secure
>
> And the following in my web.config file:
> <authentication mode="Forms">
> <forms name=".ASPXAUTH"
> loginUrl="login.aspx"
> protection="All"
> timeout="30"
> path="\">
> </forms>
> </authentication>
> <authorization>
> <allow users="*" />
> </authorization>
>
> and
>
> <!-- Configuration for the "secure" subdirectory. -->
> <location path="secure">
> <system.web>
> <authorization>
> <deny users="?" />
> </authorization>
> </system.web>
> </location>
>
> when accessing a file in the "secure" directory I get redirected to my
logon
> page. On clicking my login button, the following code fires in my
> login.aspx.cs file:
>
> private void loginButton_Click(object sender, System.EventArgs e)
> {
> if (userTextBox.Text == "user" && passwordTextbox.Text == "password")
> {
> FormsAuthentication.RedirectFromLoginPage(userTextBox.Text, false);
> }
> }
>
> The redirect url is null.
>
> What's going on? Do I need to do everything without using code-behind?
>
> Thanks in advance,
> Mark.
>
>
- Next message: Bob Leano: "CyrptProtectData"
- Previous message: Stephen Barrett: "Re: Forms based security without cookies?"
- In reply to: Mark Hughes: "Forms Authentication & Code-Behind question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]