Groups | Blog | Home
all groups > asp.net > february 2008 >

asp.net : Accessing cookies from DLL


nathan_blakley@hotmail.com
2/7/2008 11:04:35 PM
Hi,
I am not able to read or write cookies from DLLs both locally and on
Godaddy's web hosting site. I have ASP.NET 2 set up in both locations.
There must be a trick. My code looks as follows:

return (HttpContext.Current.Request.Cookies[m_strCookieName] != null);

I have unchecked the "Allow Unsafe Code" box in VS.

Many thanks
George Ter-Saakov
2/8/2008 7:36:22 AM
To reqad a cookie you use Request.Cookies...
to write a cookie you use Response.Cookies....
I see code yo try to read Cookie but do not see code to write Cookie..


George.




[quoted text, click to view]

nathan_blakley@hotmail.com
2/9/2008 7:26:42 AM
Thank you, George. Yes, I do use the request and response objects as
you say. I apologize for not saying so.
The dll resides in the web site's bin directory and can both read and
write to a directory (after I set permissions). Cannot read or write a
cookie though.
Hate to have to rely on IP addresses but am considering it.
Nathan

[quoted text, click to view]
nathan_blakley@hotmail.com
2/10/2008 7:57:15 AM
I should have mentioned, this dll contains a CompositeControl.
Nathan

[quoted text, click to view]
AddThis Social Bookmark Button