Forms Authentication problem

  • Thread starter Cristian Lefter
  • Start date

C

Cristian Lefter

I work on an ASP.NET application for an intranet that uses forms
authentication.
The authentication works fine on the workstations (Windows XP Professional)
but fails on Windows 2003 Server Standard edition. For some reason
http://localhost/WebApp works fine, http://IP/WebApp works also but
http://servername/WebApp doesn't. I looked at the http headers and when it's
not workin the server responds with an authentication cookie and a
ASP_Net_Session cookie but the browser doesn't send it back.

The code looks like :
"
Dim tkt As FormsAuthenticationTicket
Dim cookiestr As String
Dim ck As HttpCookie

tkt = New FormsAuthenticationTicket(1, txtUserName.Value,
DateTime.Now(), _
dateTime.Now.AddMinutes(30), chkPersistCookie.Checked, "your custom data")
cookiestr = FormsAuthentication.Encrypt(tkt)
ck = new HttpCookie(FormsAuthentication.FormsCookieName(), cookiestr)
if (chkPersistCookie.Checked) then ck.Expires=tkt.Expiration
ck.Path = FormsAuthentication.FormsCookiePath()
Response.Cookies.Add(ck)
"
We tried the HOW TO: Implement Forms-Based Authentication in Your ASP.NET
Application by Using Visual Basic .NET(
http://support.microsoft.com/?kbid=308157 ) with the same result.
The behavior is the same for another development server (also with Windows
2003 Server).

Thank you,
Cristian
 
Ad

Advertisements


Top