473,732 Members | 2,205 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 3880
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
2134
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
2253
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
1952
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
2485
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
13789
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
8641
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
1884
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
2174
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
1802
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
8946
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8774
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9447
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
9307
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...
0
9181
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6031
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4550
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...
0
4809
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2721
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.