Marcin, I'm no expert (well with .Net anyway) however, I think you may
be looking in the wrong place for the source of this strange behaviour.
Cookies are sent too and stored in the Client Browser viewing the
page(s) and NOT within the Server / Page embedding your page (ie: your
partner). The client browser makes the request for your page when used
in a frame and NOT your partners page.
The fact that you appear to be saying the cookie is not present when
they return to the page (you are checking before recreating it) would
suggest that their browser is refusing to accept cookies. Remember
cookies can be disabled client side (and / or restricted by security
policies) and your application / page will never truly know.
It is also possible that the cookie is being blocked by other Firewall /
Ad Blocking / Popup Blocking restrictions on the client PC (ie: as your
page is being viewed in a frame, it may be being treated as a Banner Ad
and therefore restricted). This sounds more likely as you mention things
are OK if the page is viewed outside the frame (ie: direct).
The session problem is a red herring as session management is performed
automatically by ** Cookies **. You would need to handle your own
session management by persisting the session data to a database or some
other method. This approach MUST be taken when using a Web Farm (ie: Web
Server Cluster) as each request can be being handled by a different
server within the farm.
In message <uA**************@TK2MSFTNGP14.phx.gbl>, Marcin Gorzynski
<ma****@apartmentsapart.com> writes
Hi
Yes it is, for sure there is IIS and Asp.net
The cookie can not be issued because my partner opens my domain in a frame.
If you open normally or if I make my domain as a top frame then it is ok.
Cookie can not be save to the client it behaves like not persisten cookie
but each time you click something inside the frame, new cookie is created
Response.Cookies["Affi"]["cid"]="45";
Response.Cookies["Affi"]["affref"]="aff";
Response.Cookies["Affi"].Expires=DateTime.Now.AddMonths(1);
Response.Cookies["Affi"].Domain = "domain.com";
Response.Write(Request.Cookies["Affi"]["cid"]);
You can read it now, but on next page it will vanish.
the same is with session each time you click the new session is created and
old is discarded.
I am not sure why but it looks like even session cookie can not be alive for
longer than one request.
"Cor Ligthert" <no************@planet.nl> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl... Marcin,
> Our partner is using our page in a frame. That couses a problem because
> our
> domain is unable to issue the cookie also session does not work. eachtime > you click in the frame new session is created.
>
The simplest one, find another domain for your partner.
No cookies and no sessions, is your domain really on a IIS and ASPNet
server?
--
Andrew D. Newbould E-Mail:
ne********@NOSPAMzadsoft.com
ZAD Software Systems Web :
www.zadsoft.com