Reading cookie in asp.net made by ASP

Liviathan

Platinum Member
Feb 21, 2001
2,286
0
0
Different apps. I need to read the cookie made by the ASP page when my asp.net page is called. When the .net runs the cookie never loads.




ASP CODE:
Sub createNReturnGUID(lid)

Response.Cookies ("yourRequestID")("RequestID") = lid
Response.Cookies ("yourRequestID").expires = Now() + 60

End Sub


.net CODE:
dim cookie as httpcookie
cookie = request.cookies("yourRequestID")
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Check what domain and virtual path are being used. I believe ASP.Net defaults to / for the path, and ASP defaults to something more deeply nested (the virtual directory, generally). Just one thought.
 

Liviathan

Platinum Member
Feb 21, 2001
2,286
0
0
I tried the virtual path thing no go.

Would it matter that I'm running the ASP page from the web and the .net local?

Really stumped here...and i just need to read ONE value from the dumb cookie.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: Liviathan
I tried the virtual path thing no go.

Would it matter that I'm running the ASP page from the web and the .net local?

Really stumped here...and i just need to read ONE value from the dumb cookie.

Yes, that could matter a lot.

What is the URL of the ASP page and what is the URL of the .NET page?
 

torpid

Lifer
Sep 14, 2003
11,631
11
76
Originally posted by: Liviathan
I tried the virtual path thing no go.

Would it matter that I'm running the ASP page from the web and the .net local?

Really stumped here...and i just need to read ONE value from the dumb cookie.

Wouldn't that make the domain different? That is why I asked what the domain is... are they being set to the same thing in both apps?
 

Liviathan

Platinum Member
Feb 21, 2001
2,286
0
0
the asp is not setting the domain to anything...asp.net doesn't set the cookie just reads it.

The ASP is an old app someone else wrote a few years back.
 

Liviathan

Platinum Member
Feb 21, 2001
2,286
0
0
Originally posted by: MrChad
Originally posted by: Liviathan
I tried the virtual path thing no go.

Would it matter that I'm running the ASP page from the web and the .net local?

Really stumped here...and i just need to read ONE value from the dumb cookie.

Yes, that could matter a lot.

What is the URL of the ASP page and what is the URL of the .NET page?



ASP: www.allinternetnow.com

.net, right now is localhost as i am still developing.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: Liviathan
Originally posted by: MrChad
Originally posted by: Liviathan
I tried the virtual path thing no go.

Would it matter that I'm running the ASP page from the web and the .net local?

Really stumped here...and i just need to read ONE value from the dumb cookie.

Yes, that could matter a lot.

What is the URL of the ASP page and what is the URL of the .NET page?

ASP: www.allinternetnow.com

.net, right now is localhost as i am still developing.

Those two apps can never read each others cookies. An application can only read a cookie set by a page in its own domain or subdomain.

Read this article on cookie basics.
 

Liviathan

Platinum Member
Feb 21, 2001
2,286
0
0
well eventually is going to be in its own domain...i tried running my app in the same server with same domain and still didn't work.