Re: Forms Authentication - Does Not Redirect
From: Steve Jansen (stj3_at_nospam.columbia.edu)
Date: 07/30/03
- Next message: ElmoWatson: "Re: Forms Authentication - Does Not Redirect"
- Previous message: IntraRELY: "Deny Access to a page"
- In reply to: ElmoWatson: "Forms Authentication - Does Not Redirect"
- Next in thread: ElmoWatson: "Re: Forms Authentication - Does Not Redirect"
- Reply: ElmoWatson: "Re: Forms Authentication - Does Not Redirect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Wed, 30 Jul 2003 14:42:50 -0400
Elmo,
Perhaps you are missing the "allow" child node in your web.config file?
<authorization>
<deny users="?" /> <!-- denies anonymous access -->
<allow users="*, YourRoleName, SomeUsername, Etc" /> <!--allows all
authenticated users -->
</authorization>
According to MSDN: "The default authorization rule in the Machine.config
file is <allow users="*"/> so, by default, access is allowed unless
configured otherwise." Looks like you forgot to include an allow tag.
-Steve
"ElmoWatson" <sputnik75043@yahoo.com> wrote in message
news:OQBUeEsVDHA.2544@tk2msftngp13.phx.gbl...
> Here's my problem - - I'm trying to setup Forms Authentication on my
server.
> I can get the login page to show up every time, but, when it authenticates
> (I have a database lookup setup, which apparently DOES give back good
data),
> it just refreshes the login page, deleting the username & password.
>
> I know the database routine works. It returns a user's account properties,
> if verified and nothing, if not - - then, if it returns data from the
> database, I set 'blnValidUer' to True - otherwise, I set it to false. This
> is working as expected.
> Then, I do this in my code:
> if blnValidUser="True" then
> FormsAuthentication.RedirectFromLoginPage(txtUID.text, True)
> (I've also tried -----'response.Write (request.QueryString
> ("ReturnURL") & "<br>")
> else
> lblError.text="We're sorry, but the information you provided does not
> match our database. Please try again."
> End If
>
> Here's my Web.config Code:
> <authentication mode="Forms">
> <forms name="MySite"
> loginUrl="login.aspx"
> protection="All"
> timeout="480"
> path="/"
> />
> </authentication>
> <authorization>
> <deny users="?" />
> </authorization>
> I checked an earlier post - - my webserver is named normally, with nothing
> but letters (no underscores, etc) - - so that's not the problem
>
> Is there something I'm missing here? Why doesn't it redirect correctly?
>
>
- Next message: ElmoWatson: "Re: Forms Authentication - Does Not Redirect"
- Previous message: IntraRELY: "Deny Access to a page"
- In reply to: ElmoWatson: "Forms Authentication - Does Not Redirect"
- Next in thread: ElmoWatson: "Re: Forms Authentication - Does Not Redirect"
- Reply: ElmoWatson: "Re: Forms Authentication - Does Not Redirect"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]