473,854 Members | 1,502 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Storing Cookies

Hi all,

Anyone know of any special issues with storing cookies with ASP? I'm
trying this with two browsers: One is IE 6.0 with cookies set to
'prompt'. This has been working properly as any new site I goto seems
to prompt me to store their cookie. The other is Pocket IE on Pocket
PC 2002, with the cookies set to 'enabled'.

My problem is that the cookies dont seem to be being written with my
ASP. I dont get the prompt to store the cookie when I should. My
storage code looks like this:

Response.Cookie s("AcctNbr") = nAcctNbr
Response.Cookie s("MsgStart") = nMsgStart
Response.Cookie s("MsgEnd") = nMsgEnd
Response.Cookie s("AcctNbr").Ex pires = DateAdd("h", 15, Now)
Response.Cookie s("MsgStart").E xpires = DateAdd("h", 15, Now)
Response.Cookie s("MsgEnd").Exp ires = DateAdd("h", 15, Now)
And the read code looks like this:

If Not(Request.Coo kies("AcctNbr") ="") Then
nAcctNbr = CInt(Request.Co okies("AcctNbr" ))
End If
If Not(Request.Coo kies("MsgStart" )="") Then
nMsgStart = CInt(Request.Co okies("MsgStart "))
End If
If Not(Request.Coo kies("MsgEnd")= "") Then
nMsgEnd = CInt(Request.Co okies("MsgEnd") )
End If
Of course nothing is read in, but past that, my browser does not
prompt for storage either..

Any ideas?

Thanks in advance...

-BB
Jul 19 '05 #1
4 3889
Hi Brian,

You asked if ASP does something special with cookies. No, it sends them to
the browser in the normal manner.

You also wrote that you verified that IE6 is receiving cookies from sites
that you visit, but it appears that pocket IE is not receiving cookies.

When you visit your own web page with IE6 multiple times in a row, does it
receive the values from the cookies? Can you repeat this with Pocket IE? I
think the error is with Pocket IE rather than with the web site.

Thank you, Mike
Microsoft, ASP.NET

Microsoft Security Announcement: Have you installed the patch for Microsoft
Security Bulletin MS03-039? If not, Microsoft strongly advises you to
review the information at the following link regarding Microsoft Security
Bulletin MS03-039
http://www.microsoft.com/technet/sec...n/ms03-039.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the Windows Update scan will help to insure you are current
with all security patches, not just MS03-039.

Microsoft also highly recommends to all customers that you visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
From: Brian Burgess <bb********@hot mail.com>
Subject: Storing Cookies
Date: Wed, 10 Sep 2003 10:14:59 +0800
Message-ID: <bo************ *************** *****@4ax.com>
X-Newsreader: Forte Free Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: microsoft.publi c.inetserver.as p.general
NNTP-Posting-Host: vp161007.kln.ua c1.hknet.com 203.169.161.7
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.inetserver.as p.general:25215 0
X-Tomcat-NG: microsoft.publi c.inetserver.as p.general

Hi all,

Anyone know of any special issues with storing cookies with ASP? I'm
trying this with two browsers: One is IE 6.0 with cookies set to
'prompt'. This has been working properly as any new site I goto seems
to prompt me to store their cookie. The other is Pocket IE on Pocket
PC 2002, with the cookies set to 'enabled'.

My problem is that the cookies dont seem to be being written with my
ASP. I dont get the prompt to store the cookie when I should. My
storage code looks like this:

Response.Cookie s("AcctNbr") = nAcctNbr
Response.Cookie s("MsgStart") = nMsgStart
Response.Cookie s("MsgEnd") = nMsgEnd
Response.Cookie s("AcctNbr").Ex pires = DateAdd("h", 15, Now)
Response.Cookie s("MsgStart").E xpires = DateAdd("h", 15, Now)
Response.Cookie s("MsgEnd").Exp ires = DateAdd("h", 15, Now)
And the read code looks like this:

If Not(Request.Coo kies("AcctNbr") ="") Then
nAcctNbr = CInt(Request.Co okies("AcctNbr" ))
End If
If Not(Request.Coo kies("MsgStart" )="") Then
nMsgStart = CInt(Request.Co okies("MsgStart "))
End If
If Not(Request.Coo kies("MsgEnd")= "") Then
nMsgEnd = CInt(Request.Co okies("MsgEnd") )
End If
Of course nothing is read in, but past that, my browser does not
prompt for storage either..

Any ideas?

Thanks in advance...

-BB


Jul 19 '05 #2
Well I have my IE60 set to prompt to accept all cookies. And I have
tried a sample cookie setting and reading page from the CodeProject.
This works and prompts me on my IE60 to save the cookie. .. It IS
something I'm doing wrong in my ASP .. just cant figure out what ..
:-(

On Wed, 10 Sep 2003 20:38:06 GMT, mi****@online.m icrosoft.com ("Mike
Moore [MSFT]") wrote:
Hi Brian,

You asked if ASP does something special with cookies. No, it sends them to
the browser in the normal manner.

You also wrote that you verified that IE6 is receiving cookies from sites
that you visit, but it appears that pocket IE is not receiving cookies.

When you visit your own web page with IE6 multiple times in a row, does it
receive the values from the cookies? Can you repeat this with Pocket IE? I
think the error is with Pocket IE rather than with the web site.

Thank you, Mike
Microsoft, ASP.NET

Microsoft Security Announcement: Have you installed the patch for Microsoft
Security Bulletin MS03-039? If not, Microsoft strongly advises you to
review the information at the following link regarding Microsoft Security
Bulletin MS03-039
http://www.microsoft.com/technet/sec...n/ms03-039.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the Windows Update scan will help to insure you are current
with all security patches, not just MS03-039.

Microsoft also highly recommends to all customers that you visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
From: Brian Burgess <bb********@hot mail.com>
Subject: Storing Cookies
Date: Wed, 10 Sep 2003 10:14:59 +0800
Message-ID: <bo************ *************** *****@4ax.com>
X-Newsreader: Forte Free Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: microsoft.publi c.inetserver.as p.general
NNTP-Posting-Host: vp161007.kln.ua c1.hknet.com 203.169.161.7
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.inetserver.as p.general:25215 0
X-Tomcat-NG: microsoft.publi c.inetserver.as p.general

Hi all,

Anyone know of any special issues with storing cookies with ASP? I'm
trying this with two browsers: One is IE 6.0 with cookies set to
'prompt'. This has been working properly as any new site I goto seems
to prompt me to store their cookie. The other is Pocket IE on Pocket
PC 2002, with the cookies set to 'enabled'.

My problem is that the cookies dont seem to be being written with my
ASP. I dont get the prompt to store the cookie when I should. My
storage code looks like this:

Response.Cookie s("AcctNbr") = nAcctNbr
Response.Cookie s("MsgStart") = nMsgStart
Response.Cookie s("MsgEnd") = nMsgEnd
Response.Cookie s("AcctNbr").Ex pires = DateAdd("h", 15, Now)
Response.Cookie s("MsgStart").E xpires = DateAdd("h", 15, Now)
Response.Cookie s("MsgEnd").Exp ires = DateAdd("h", 15, Now)
And the read code looks like this:

If Not(Request.Coo kies("AcctNbr") ="") Then
nAcctNbr = CInt(Request.Co okies("AcctNbr" ))
End If
If Not(Request.Coo kies("MsgStart" )="") Then
nMsgStart = CInt(Request.Co okies("MsgStart "))
End If
If Not(Request.Coo kies("MsgEnd")= "") Then
nMsgEnd = CInt(Request.Co okies("MsgEnd") )
End If
Of course nothing is read in, but past that, my browser does not
prompt for storage either..

Any ideas?

Thanks in advance...

-BB


Jul 19 '05 #3
What 's the value of nAcctNbr,nMsgSt art,nMsgEnd?
This is where the problem exists.

"Brian Burgess" <bb********@hot mail.com>
??????:bo****** *************** ***********@4ax .com...
Hi all,

Anyone know of any special issues with storing cookies with ASP? I'm
trying this with two browsers: One is IE 6.0 with cookies set to
'prompt'. This has been working properly as any new site I goto seems
to prompt me to store their cookie. The other is Pocket IE on Pocket
PC 2002, with the cookies set to 'enabled'.

My problem is that the cookies dont seem to be being written with my
ASP. I dont get the prompt to store the cookie when I should. My
storage code looks like this:

Response.Cookie s("AcctNbr") = nAcctNbr
Response.Cookie s("MsgStart") = nMsgStart
Response.Cookie s("MsgEnd") = nMsgEnd
Response.Cookie s("AcctNbr").Ex pires = DateAdd("h", 15, Now)
Response.Cookie s("MsgStart").E xpires = DateAdd("h", 15, Now)
Response.Cookie s("MsgEnd").Exp ires = DateAdd("h", 15, Now)
And the read code looks like this:

If Not(Request.Coo kies("AcctNbr") ="") Then
nAcctNbr = CInt(Request.Co okies("AcctNbr" ))
End If
If Not(Request.Coo kies("MsgStart" )="") Then
nMsgStart = CInt(Request.Co okies("MsgStart "))
End If
If Not(Request.Coo kies("MsgEnd")= "") Then
nMsgEnd = CInt(Request.Co okies("MsgEnd") )
End If
Of course nothing is read in, but past that, my browser does not
prompt for storage either..

Any ideas?

Thanks in advance...

-BB

Jul 19 '05 #4
Hi Brian,

I'd like to return to basics for this. Please start a new blank page and
add this code. Then browse it and then refresh the page with IE and Pocket
IE. Then post the results.
<%
Response.Write Request.Cookies ("abc")
Response.Cookie s("abc") = "123"
Response.CacheC ontrol="no-cache"
%>

Thank you, Mike
Microsoft, ASP.NET

Microsoft highly recommends to all of our customers that they visit the
http://www.microsoft.com/protect site and perform the three straightforward
steps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
From: Brian Burgess <bb********@hot mail.com>
Subject: Re: Storing Cookies
Date: Thu, 11 Sep 2003 08:31:49 +0800
Message-ID: <1f************ *************** *****@4ax.com>
References: <bo************ *************** *****@4ax.com> <dV************ **@cpmsftngxa06 .phx.gbl> X-Newsreader: Forte Free Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Newsgroups: microsoft.publi c.inetserver.as p.general
NNTP-Posting-Host: vp161007.kln.ua c1.hknet.com 203.169.161.7
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!tk2 msftngp13.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.inetserver.as p.general:25231 5
X-Tomcat-NG: microsoft.publi c.inetserver.as p.general

Well I have my IE60 set to prompt to accept all cookies. And I have
tried a sample cookie setting and reading page from the CodeProject.
This works and prompts me on my IE60 to save the cookie. .. It IS
something I'm doing wrong in my ASP .. just cant figure out what ..
:-(

On Wed, 10 Sep 2003 20:38:06 GMT, mi****@online.m icrosoft.com ("Mike
Moore [MSFT]") wrote:
Hi Brian,

You asked if ASP does something special with cookies. No, it sends them tothe browser in the normal manner.

You also wrote that you verified that IE6 is receiving cookies from sitesthat you visit, but it appears that pocket IE is not receiving cookies.

When you visit your own web page with IE6 multiple times in a row, does itreceive the values from the cookies? Can you repeat this with Pocket IE? Ithink the error is with Pocket IE rather than with the web site.

Thank you, Mike
Microsoft, ASP.NET

Microsoft Security Announcement: Have you installed the patch for MicrosoftSecurity Bulletin MS03-039? If not, Microsoft strongly advises you to
review the information at the following link regarding Microsoft SecurityBulletin MS03-039
http://www.microsoft.com/technet/sec...n/ms03-039.asp and/or tovisit Windows Update at http://windowsupdate.microsoft.com to install thepatch. Running the Windows Update scan will help to insure you are currentwith all security patches, not just MS03-039.

Microsoft also highly recommends to all customers that you visit the
http://www.microsoft.com/protect site and perform the three straightforwardsteps listed to improve your computer’s security.

This posting is provided "AS IS", with no warranties, and confers no rights.

--------------------
From: Brian Burgess <bb********@hot mail.com>
Subject: Storing Cookies
Date: Wed, 10 Sep 2003 10:14:59 +0800
Message-ID: <bo************ *************** *****@4ax.com>
X-Newsreader: Forte Free Agent 1.92/32.572
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Newsgroups: microsoft.publi c.inetserver.as p.general
NNTP-Posting-Host: vp161007.kln.ua c1.hknet.com 203.169.161.7
Lines: 1
Path: cpmsftngxa06.ph x.gbl!TK2MSFTNG P08.phx.gbl!TK2 MSFTNGP09.phx.g bl
Xref: cpmsftngxa06.ph x.gbl microsoft.publi c.inetserver.as p.general:25215 0 X-Tomcat-NG: microsoft.publi c.inetserver.as p.general

Hi all,

Anyone know of any special issues with storing cookies with ASP? I'm
trying this with two browsers: One is IE 6.0 with cookies set to
'prompt'. This has been working properly as any new site I goto seems
to prompt me to store their cookie. The other is Pocket IE on Pocket
PC 2002, with the cookies set to 'enabled'.

My problem is that the cookies dont seem to be being written with my
ASP. I dont get the prompt to store the cookie when I should. My
storage code looks like this:

Response.Cookie s("AcctNbr") = nAcctNbr
Response.Cookie s("MsgStart") = nMsgStart
Response.Cookie s("MsgEnd") = nMsgEnd
Response.Cookie s("AcctNbr").Ex pires = DateAdd("h", 15, Now)
Response.Cookie s("MsgStart").E xpires = DateAdd("h", 15, Now)
Response.Cookie s("MsgEnd").Exp ires = DateAdd("h", 15, Now)
And the read code looks like this:

If Not(Request.Coo kies("AcctNbr") ="") Then
nAcctNbr = CInt(Request.Co okies("AcctNbr" ))
End If
If Not(Request.Coo kies("MsgStart" )="") Then
nMsgStart = CInt(Request.Co okies("MsgStart "))
End If
If Not(Request.Coo kies("MsgEnd")= "") Then
nMsgEnd = CInt(Request.Co okies("MsgEnd") )
End If
Of course nothing is read in, but past that, my browser does not
prompt for storage either..

Any ideas?

Thanks in advance...

-BB



Jul 19 '05 #5

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

Similar topics

1
2141
by: Blossom | last post by:
Hi there, I have a problem with storing my Cookies. I made a servlet in which I store a Cookie (in the doGet()-method) to detect whether a user has already visited my webpage. I used the following code: Cookie c = new Cookie("sessionID", generateSessionID()); c.setMaxAge(60*60*24*365);
6
2258
by: Rob Meade | last post by:
Hi all, At work we have 2 servers in a cluster for our web apps. One problem we have experienced (along with many others!) - is that if a user is logged into one of the applications on server a for example and it goes offline or fails their session is lost also - even though the application becomes available on server b. I have heard that it is possible to either exchange the sessions between
2
1963
by: Robert Hanson | last post by:
I am new to the asp.net application building and I have read the information regarding the storing of information using session vs cookies vs viewstate. I am asking for suggestions/guidance as to when each is appropriate. I noticed that in the case of cookies, there is a liability because of web browser settings migh disallow the storing of cookies. Thanks in advance, Bob Hanson
2
2492
by: jakk | last post by:
Iam storing the session state in SQL Server. The Session gets stored in the SQL Server temp tables ( I can see some values in the two tables), but the session doesnt seem to timeout. We have a situation where we have to differentiate between logout and session expiration and since the Session_End event doesnt get fired for out-of-proc sessions, I added tthe two functions public void Application_PreRequestHandlerExecute(Object sender,...
5
13790
by: Jono | last post by:
Hi Everyone, Most tutorials I've seen address cookies from the server's perspective, assuming that the client (usually a browser like Internet Explorer) will manage the persistence. I am faced with writing a C#.NET client that uses a web reference to a SOAP web service, and I need to persist the cookies myself, or so it seems. The cookies stored in temporary internet files - accessed each time I hit the web service help page from IE...
10
8651
by: TahseenTarafdar | last post by:
Hi, I am updating a Java servlet to store cookies. The class inherits from HttpServlet and overrides the "service" method. Within this method I have the following code to test cookie storing and retreival: public void service( HttpServletRequest req, HttpServletResponse res ) throws IOException { ...... Cookie cookies = req.getCookies(); if( cookies != null ) {
7
1889
by: Mike | last post by:
I have developed an application, for psyc patients.... they type in very personal information in a web form to help them work through problems in their lives. Once they enter the info, I encrypt the data and store it in a MySQL database. Users can then print, edit, delete or share the information they entered with their therapist. I'm not happy storing this in the database for two reasons: (1) my host places restrictions on my database...
1
2187
by: Miesha.James | last post by:
Hello, I'm trying to rewrite visual c++ code into visual c++ .NET code and I've run across a problem with storing objects into a list. Here;s an example of the code I have: ref struct Cookies { String^ Name;
1
1809
by: webcm123 | last post by:
I'm looking for a good method of securing ratings. Cookies lock isn't sufficient. In addition to cookies I would need something else. I'm introducing some ways. -= Storing rates inside seperate tables =- Seperate tables (artrates, filerates, imgrates) will contain: ID of item | rate | user | IP 1 rate = 1 record. Field USER will filled if only registered users can
0
11025
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10682
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10758
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9513
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7915
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5743
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4562
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4159
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3187
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.