Last post Apr 02, 2010 06:41 PM by Cheezy
Apr 02, 2010 05:22 PM|BasaltRocky|LINK
If a user successfully logs in from the https://192.168.1.9/Login.Aspx page of my site, and the query string was just https://192.168.1.9/Secure/Login.aspx, then they get redirected to https://192.168.1.9/Secure/Login.aspx?ReturnUrl=%2fsecure%2fsub%2fSuccess.aspx.
The login control on Login.aspx has DestinationPageUrl="~/Secure/Sub/Success.aspx".
The web.config forms elemnt has defaultUrl="~/Secure/Sub/Success.aspx".
When the user then re-logs in from the same page (ie. https://192.168.1.9/Secure/Login.aspx?ReturnUrl=%2fsecure%2fsub%2fSuccess.aspx which has the return url in the querystring), then on successful login they are correctly redirected to the Success.aspx
I am tearing my hair out trying to find the source of this behaviour.
Why does the first sucessful login from the page redirect back to the login page with the returnurl added to the querystring ???
And why does the second login with the return url specified work correctly ?
Any ideas greatfully received.
Apr 02, 2010 06:18 PM|Cheezy|LINK
just a crazy question, where's your signout code situated?
Apr 02, 2010 06:35 PM|BasaltRocky|LINK
A signout link links back to the login page with a special return url, which clears the session and authentication and then redirects to the home page.
But this is not firing at all in this case, so isn't part of the problem/solution.
Apr 02, 2010 06:41 PM|Cheezy|LINK
ok, because i was thinking your signout is within a login.aspx code behind also that why if you call just the login.aspx it signs you out thats why i asks you to login again. anyway, try to isolate by putting in a loginstatus control in your login page to
see if you're really authenticated.