472,145 Members | 2,006 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Frameset missing cookies

Hi,

I have an ASP.Net application that runs in the localhost (site-A).
With-in the .cs file I am accessing another site (site-B) that returns me
cookies. I am also able to do a Post on that site and its working. But when
I set the returned cookies from site-B in the response header, the cookies
are not visible in site-A. How do I get around to this problem?

I have noticed that if both site-A & site-B are on the same host then site-A
is able to see the cookies set by site-B.

Pseudo code

=========

site-A (GET)

site-B (GET)

Cookies set

site-B (POST)

set cookies in the response header

write the data (received from POST request - contains frameset)

Response.AddHeader("P3P", "CP=\"CAO PSA OUR\"");
Response.Cookies["system"].Value = "prod";
....
// write the page to the browser
Response.Write(result);

Sniffing HTTP packets reveals that, response header request of site-A has
the P3P policy header and the cookies. But site-A is unable to set the
cookies in subsequent calls to retrieve the content from the frames.

Thanks
Sanjib
Jan 28 '08 #1
1 1530
thats correct, browser security requires that cookies are only shared
between site with the same domain (or sub domain) specfied when the
cookie is created. there must at least one dot in the subdomain.

-- bruce (sqlwork.com)

Sanjib Biswas wrote:
Hi,

I have an ASP.Net application that runs in the localhost (site-A).
With-in the .cs file I am accessing another site (site-B) that returns me
cookies. I am also able to do a Post on that site and its working. But when
I set the returned cookies from site-B in the response header, the cookies
are not visible in site-A. How do I get around to this problem?

I have noticed that if both site-A & site-B are on the same host then site-A
is able to see the cookies set by site-B.

Pseudo code

=========

site-A (GET)

site-B (GET)

Cookies set

site-B (POST)

set cookies in the response header

write the data (received from POST request - contains frameset)

Response.AddHeader("P3P", "CP=\"CAO PSA OUR\"");
Response.Cookies["system"].Value = "prod";
...
// write the page to the browser
Response.Write(result);

Sniffing HTTP packets reveals that, response header request of site-A has
the P3P policy header and the cookies. But site-A is unable to set the
cookies in subsequent calls to retrieve the content from the frames.

Thanks
Sanjib

Jan 28 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

8 posts views Thread by Hans | last post: by
4 posts views Thread by Frances Del Rio | last post: by
14 posts views Thread by Alex Molochnikov | last post: by
1 post views Thread by Jerron | last post: by
satchmo67
2 posts views Thread by satchmo67 | last post: by
7 posts views Thread by eyal.herlin | last post: by
25 posts views Thread by Geoff Cox | last post: by
2 posts views Thread by vjayis | last post: by
reply views Thread by leo001 | last post: by

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.