473,398 Members | 2,812 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

Accessing cookies from DLL

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
Nathan
Feb 8 '08 #1
3 1751
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.


<na************@hotmail.comwrote in message
news:57**********************************@c23g2000 hsa.googlegroups.com...
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
Nathan

Feb 8 '08 #2
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

On Feb 8, 4:36 am, "George Ter-Saakov" <gt-...@cardone.comwrote:
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.

<nathan_blak...@hotmail.comwrote in message

news:57**********************************@c23g2000 hsa.googlegroups.com...
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
Nathan
Feb 9 '08 #3
I should have mentioned, this dll contains a CompositeControl.
Nathan

On Feb 9, 7:26 am, nathan_blak...@hotmail.com wrote:
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

On Feb 8, 4:36 am, "George Ter-Saakov" <gt-...@cardone.comwrote:
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.
<nathan_blak...@hotmail.comwrote in message
news:57**********************************@c23g2000 hsa.googlegroups.com...
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
Nathan
Feb 10 '08 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Don | last post by:
I had my host map "domainA.com" to folder "domainB.com/folder". I'm finding when accessing "domainA.com" that PHP scripts which utilize $_COOKIE aren't able to see the cookies belonging to...
8
by: ndsoumah | last post by:
hello guys I'm trying to get access to variables I put in a session variable from another page and it fails... here's the exact situation main file page1.php
3
by: Raterus | last post by:
Hello, I've got a bunch of web-portals that customers use to log-in and see their data. In a production environment, each of these has a completely different domain name, but they all point back...
4
by: Paul Brant | last post by:
Hi all, I have a page with an IFRAME in it. From a script in the main ( parent ) page I instruct the IFRAME to load a specific URL. The URL contains parameters that are processed by the server....
6
by: omyek | last post by:
I'm trying to mimic the browsing of a webpage using an HttpWebRequest. I've had a lot of luck with it so far, including logging into pages, posting form data, and even collecting and using cookies....
1
by: Luca Bertoldi | last post by:
Hi all, I developed a base class that inherits from System.Web.UI.Page and I'd like to check some cookies in the constructor of the class. I tried with if (Context.Request.Cookies == null) {...
0
by: Joergen Bech | last post by:
Fairly new to ASP.NET 1.1. Getting the error below when running application on a web server outside of my control, but only the first time I run it: 1. After a long period of inactivity (or...
4
by: lalitha1024 | last post by:
Hi, In my Asp.net project when i am login to my site, i'll set th cookies by using below commands. Dim IdCookie As New HttpCookie("empid" ds.Tables(0).Rows(0).Item(0)) Dim FnameCookie As New...
1
by: Hari | last post by:
Hi, I'm working on a winapp that sends a httprequest to a remote server. The server actually sends back a cookie for login request. I have searched a lot. I didn't find the right solution for...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.