RE: Lost Cookie during Authentication

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



While this may not solve this particular problem, make sure you have a check
for the redirect page. Microsoft hard coded default.aspx for cases when the
login page was hit directly. If you do not have a default.aspx, this will
cause errors.

As for determining the scope of the problem, I would use a tool that can
capture the HTTP request and response. I do not have the link saved on this
machine, so I will have to respond back later, if I get the time.

I wish I had a better answer, but I am stumped, as well. And, I have little
information to go on to figure out the extent of the problem.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

***************************
Think Outside the Box!
***************************


"yofnik@xxxxxxxxxxx" wrote:

> Hello All,
> I am going crazy trying to figure out why my ASP.NET web application
> cannot get beyond the login screen. It is using very simple Forms based
> authentication:
>
> if(!FormsAuthentication.Authenticate(tbUserName.Value,
> tbPassword.Value))
> {
> pageInfo.Text = "Invalid user name or password. Please try again.";
> }
> else
> {
> FormsAuthentication.RedirectFromLoginPage(tbUserName.Value, false);
> }
>
> If the username and password are wrong, the Authentication fails as
> expected and the error message is displayed. If the credentials are
> correct, the Redirect does not happen and it returns to the login page.
> After turning Tracing on, I noticed that the authentication cookie is
> not getting saved. It gets created after the Login POST, but then the
> next page, the cookie is gone. Where in my development environment, the
> cookie gets created and remains on every page thereafter.
>
> I have seen this questions in a few other posts, but none of them had
> an answer. Why does the Authentication Cookie go away after the login
> page? Can anyone please help!
>
> Thanks in advance.
>
>
.



Relevant Pages

  • Re: login redirect doesnt work
    ... >> build a login screen at witch users can login. ... >> try to redirect the user to the protected pages. ... my code doesn't authenticate the right way. ... > If you do set up the authentication cookie yourself, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: login redirect doesnt work
    ... > build a login screen at witch users can login. ... what happens when you try to redirect the user? ... If you do set up the authentication cookie yourself, ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Strange session timeout problem(urgent help needed).
    ... >> The sign of that is that users are prompted with the login page. ... > You said you are using forms authentication: the login page prompt could ... > be because the forms authentication cookie has timed out. ... Prev by Date: ...
    (microsoft.public.dotnet.framework.aspnet)
  • Lost Cookie during Authentication
    ... If the username and password are wrong, the Authentication fails as ... the Redirect does not happen and it returns to the login page. ... I noticed that the authentication cookie is ... It gets created after the Login POST, ...
    (microsoft.public.dotnet.framework)
  • Lost Cookie during Authentication
    ... I am going crazy trying to figure out why my ASP.NET web application ... the Redirect does not happen and it returns to the login page. ... I noticed that the authentication cookie is ... It gets created after the Login POST, ...
    (microsoft.public.dotnet.framework.aspnet)