Authentication Keeps returning to Login Page
From: dave (dave_at_edin.co.uk)
Date: 11/10/03
- Next message: Christian: "impersonation in a sub thread"
- Previous message: Daniel Jin: "Authorization Manager Interop availability (azroles)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 10 Nov 2003 17:36:48 -0000
I have the following problem:
my web.config file (see below) protects the entire website and when a user
tries to go to a page they are redirected to the login - all is well..
However, even though they have been authenticated it is still returning to
the login page. However if i then go to the original page i wanted it will
let me in, as i have now been authenticated, so that part is working...
The login code is straight forward enough (see below), but i cannot for the
life of me work out why it keeps returning to the login page. I have tried
many variations to get me to the originally requested page, but no success.
Thanks in advance..
Web Config settings.
<configuration>
<system.web>
<customErrors mode="Off"/>
<pages smartNavigation="true"/>
<compilation debug="true"/>
<authentication mode="Forms" >
<forms name="App1" path="/" loginUrl="login.aspx" >
<credentials passwordFormat="Clear">
<user name="tester" password="testing" />
</credentials>
</forms>
</authentication>
<authorization>
<allow users="tester"/>
<deny users="?"/>
</authorization>
</system.web>
</configuration>
Login Code.
sub DoLogin(objSender as Object, objArgs As EventArgs)
if FormsAuthentication.Authenticate(username.value, password.value) then
formsauthentication.redirectfromloginpage(username.value, "False")
end if
end sub
- Next message: Christian: "impersonation in a sub thread"
- Previous message: Daniel Jin: "Authorization Manager Interop availability (azroles)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|
|