Sanjeet
asked on
Cookie not working right
I am testing from my pc using sskoppikar.ift.org as a domain but my cookie is not working right. When I debug I can see the values in the cookies being set. Here is my code:
My cookie code is below. I don't get any build error. Do you see any problems?
HttpCookie confexCookie = new HttpCookie("LyrisForumn");
confexCookie.Value = (password);
confexCookie.Value = (strListName);
confexCookie.Value = (PageBase.CurrentUserEmail );
confexCookie.Value = (returnURL);
confexCookie.Domain = ConfigurationSettings.AppS ettings["C onfexCooki eDomain"];
Response.Cookies.Add(confe xCookie);
Response.Redirect("http://{listma nager server}/read/login/auto.tm l");
-------------------------- ---------- ---------- ---------- ---------- ---------- ---------- -
However when I click on the a Test List the page thats gets displayed is:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
-------------------------- ---------- ---------- ---------- ---------- ---------- ----
Please try the following:
Click the Refresh button, or try again later.
If you typed the page address in the Address bar, make sure that it is spelled correctly.
To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP).
See if your Internet connection settings are being detected. You can set Microsoft Windows to examine your network and automatically discover network connection settings (if your network administrator has enabled this setting).
Click the Tools menu, and then click Internet Options.
On the Connections tab, click LAN Settings.
Select Automatically detect settings, and then click OK.
Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed.
If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.
Click the Back button to try another link.
Cannot find server or DNS Error
My cookie code is below. I don't get any build error. Do you see any problems?
HttpCookie confexCookie = new HttpCookie("LyrisForumn");
confexCookie.Value = (password);
confexCookie.Value = (strListName);
confexCookie.Value = (PageBase.CurrentUserEmail
confexCookie.Value = (returnURL);
confexCookie.Domain = ConfigurationSettings.AppS
Response.Cookies.Add(confe
Response.Redirect("http://{listma
--------------------------
However when I click on the a Test List the page thats gets displayed is:
The page cannot be displayed
The page you are looking for is currently unavailable. The Web site might be experiencing technical difficulties, or you may need to adjust your browser settings.
--------------------------
Please try the following:
Click the Refresh button, or try again later.
If you typed the page address in the Address bar, make sure that it is spelled correctly.
To check your connection settings, click the Tools menu, and then click Internet Options. On the Connections tab, click Settings. The settings should match those provided by your local area network (LAN) administrator or Internet service provider (ISP).
See if your Internet connection settings are being detected. You can set Microsoft Windows to examine your network and automatically discover network connection settings (if your network administrator has enabled this setting).
Click the Tools menu, and then click Internet Options.
On the Connections tab, click LAN Settings.
Select Automatically detect settings, and then click OK.
Some sites require 128-bit connection security. Click the Help menu and then click About Internet Explorer to determine what strength security you have installed.
If you are trying to reach a secure site, make sure your Security settings can support it. Click the Tools menu, and then click Internet Options. On the Advanced tab, scroll to the Security section and check settings for SSL 2.0, SSL 3.0, TLS 1.0, PCT 1.0.
Click the Back button to try another link.
Cannot find server or DNS Error
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your right, I had to change the server name and I did. I changed but my cookie still does not work. I have added the updated code:
string returnURL = PageBase.CmsPosting.Url;
HttpCookie confexCookie = new HttpCookie("LyrisForumn");
confexCookie.Value = (password);
confexCookie.Value = (strListName);
confexCookie.Value = (PageBase.CurrentUserEmail );
confexCookie.Value = (returnURL);
confexCookie.Domain = ConfigurationSettings.AppS ettings["C onfexCooki eDomain"];
Response.Cookies.Add(confe xCookie);
Response.Redirect("http://{listse rv.ift.org }/read/log in/auto.tm l");
string returnURL = PageBase.CmsPosting.Url;
HttpCookie confexCookie = new HttpCookie("LyrisForumn");
confexCookie.Value = (password);
confexCookie.Value = (strListName);
confexCookie.Value = (PageBase.CurrentUserEmail
confexCookie.Value = (returnURL);
confexCookie.Domain = ConfigurationSettings.AppS
Response.Cookies.Add(confe
Response.Redirect("http://{listse
It may be something to do with Domains. I had a problem with cookies when I was building out our framework for them, and I remember having a pain dealing with the domains. Check to make sure your domain setting is correct, and that you are able to read any cookie from that domain in the linked domain.
ASKER
It works now the problem is I had to remove the brackets the response.redirect to:
("http://listserv.ift.org/read/login/auto.tml");
("http://listserv.ift.org/read/login/auto.tml");
ASKER
2. Yeah the auto.tml is correct. STands for trans meta link somthing like that.
Any other ideas?
Thanks!