I have a site usings ASP.NET 2.0 and forms authentication. The site works
fine from my development pc but when I publish the website to our
development web server, the session id gets lost right after I've
authenticated and then redirect them to a protected content page.
In my Login page I verify the userid and password, then perform the
following if the credentials are valid:
FormsAuthentication.SetAuthCookie(Login1.UserName.ToString(), false);
Response.Redirect("~/MyDeals/Home.aspx");
Home.aspx is only acessible to authenticated users.
After the forms authentication cookie is created, an ASP.NET_SessionId
cookie is also created, then as soon as the response redirect happens, the
ASP.NET_SessionId goes away and I get sent back to the login page.
Here's a catch: I published the exact code to our production server and it
worked perfectly, so I'm guessing it must be some setting on the server or
in IIS that's causing the behavior.
Does anyone have an idea? I've tried everything I can think of.
url:http://www.ureader.com/gp/1522-1.aspx