cookies problem

X

xarrisx

Here is my problem!

I have page1.asp in webserver1 with this code

----------Page1 in webserver1
<script src=webserver2/page2.asp >
</script>

<script>
document.write("<iframe src=webserver2/page3.asp></iframe>")
</script>
--------------


My other two pages in webserver2 look like this

----------Page2.asp in webserver2-------
response.Cookies("USR")="user1"
response.Cookies("USR").expires=cdate("1/1/2009")
//some javascript here
---------------------------------------------------


----------Page3.asp in webserver2-------
response.write(request.Cookies("USR"))
---------------------------------------------------


===========================================================

I open internet explorer and request webserver1\page1.asp

1)the first problem is that page1.asp finishes loading but there is no
cookie in my temporary internet files( i thought that there should be since
webserver1\page1.asp calls the webserver2\page2.asp ).

2) the second problem is that even if there were a cookie in my temporary
internet files set from webserver2\page2.asp then the webserver2\page3.asp
wouldn't get it when it is called through webserver1\page1.asp(<iframe> tag)

If i directly request webserver2\page2.asp from IE then the cookie is set
If the cookie is set and request webserver2\page3.asp directly from IE then
the cookie is found!


Anybody knows why this happens or any info about that!!

Thanks in advance
 
G

Gérard Leclercq

Cookies are not crossdomaine if you don't changes the setting of MSIE.
See Internet-Options, Security, Level, and than Iframe and Sharing between
... or something like that (my MSIE is in non-english)
 
E

Evertjan.

xarrisx wrote on 09 mrt 2005 in microsoft.public.inetserver.asp.general:
Here is my problem!

I have page1.asp in webserver1 with this code

----------Page1 in webserver1
<script src=webserver2/page2.asp >
</script>

<script>
document.write("<iframe src=webserver2/page3.asp></iframe>")
</script>
--------------


My other two pages in webserver2 look like this

----------Page2.asp in webserver2-------
response.Cookies("USR")="user1"
response.Cookies("USR").expires=cdate("1/1/2009")
//some javascript here
---------------------------------------------------


----------Page3.asp in webserver2-------
response.write(request.Cookies("USR"))

This could work:

----------Page2.asp in webserver2-------
<%
response.Cookies("USR")="user1"
response.Cookies("USR").expires=cdate("2009/2/28")
%>
alert('found some javascript here');
----------------------------------------

----------Page3.asp in webserver2-------
<%
response.write request.Cookies("USR")
%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,140
Latest member
SweetcalmCBDreview
Top