Click to See Complete Forum and Search --> : Major cookie problems please help.


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

thechasboi
01-22-2007, 02:37 PM
Does any one have any ideas for me. The reason I use these folders again in a separate site is that they have functions and such that are used by both sites. I have heard this being possible but not sure how. I have tried to attempt to separate the cookies but to no avail. I have this application that both sites use to edit their account. This application has far reaching capabilities and I will need to allow possibly even more site into these folders as well, so a fix now will help me in the future. I of course do not want to make more than one directory because I do not want to forget to update files in all the outreaching folders.