thechasboi
01-22-2007, 09:33 AM
First I have two sites that use the same directory for many of their files. I have many directories I need to deal with in the second place. I am using asp cookies and using domain based cookies with no path. I still get problems with users having to relog in if they use the settings page, which is in a different directory as my display account directory. I am including my code that creates the cookies in the first place. Please tell me what on earth is wrogn with this code. There are some checks for which site and there fore go to the corresponding login page. Thanks a ton.
siteLoggingIn = lcase(request.servervariables("SERVER_NAME"))
response.cookies("iv")("Name") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCon") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCom") = DefaultValue(rs("Company"))
response.cookies("iv")("cE") = DefaultValue(rs("email"))
response.cookies("iv")("cP") = DefaultValue(rs("Phone"))
response.cookies("iv").Expires = DateAdd("m",12,Date)
response.Cookies("iv").domain = siteLoggingIn
response.Cookies("iv").path = "/"
response.Cookies("ID") = rs("ID")
response.Cookies("ID").domain = siteLoggingIn
'response.Cookies("ID").domain = ""
response.cookies("iv")("UserName")= strUserName
siteLoggingIn = lcase(request.servervariables("SERVER_NAME"))
response.cookies("iv")("Name") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCon") = rs("FirstName") & " " & rs("LastName")
response.cookies("iv")("cCom") = DefaultValue(rs("Company"))
response.cookies("iv")("cE") = DefaultValue(rs("email"))
response.cookies("iv")("cP") = DefaultValue(rs("Phone"))
response.cookies("iv").Expires = DateAdd("m",12,Date)
response.Cookies("iv").domain = siteLoggingIn
response.Cookies("iv").path = "/"
response.Cookies("ID") = rs("ID")
response.Cookies("ID").domain = siteLoggingIn
'response.Cookies("ID").domain = ""
response.cookies("iv")("UserName")= strUserName