![]() |
|
|
|||||||
![]() |
ASP Net - Session Cookie not accessible across Sub-Domains |
|
|
Thread Tools | Search this Thread |
|
|
#11 |
|
I have a situation where subsites are on different servers as in different machines.
Will i still be able to share cookie data. www.example.com subdomain themaster.example.com another domain theslave.example.com if the user logs in from any of the websites. Can all of them share the cookie. chirdeep Last edited by chirdeep : 06-20-2008 at 01:14 PM. |
|
|
|
|
|
|
#12 | |
|
Junior Member
Join Date: Jun 2008
Posts: 1
|
I cannot get Doug's 'hack' to work and I’d really like some advice in about what I'm doing wrong. I've tried adding it to my Master Page and also within instances but no luck. My Session.SessionId is the same across subdomains but I can't share session objects (like Session["Example"]).
1. Does the session mode have to be out-of-proc or can it remain inproc? Mine is currently inproc with cookieless=false 2. Do I have to add any other code other than these two lines? 3. Can these lines of code be added somewhere like Page_Load or do they have to go in a special method EndRequest or Page_Unload? Thanks Alec Quote:
alecl |
|
|
|
|
|
|
#13 |
|
Junior Member
Join Date: Apr 2009
Posts: 1
|
Hi Doug
Can you please let me know how did you solved this problem. i have been looking along three days on internet to solve this menace but to no avail. also if possible for you please give me your email, so that i can communicate to you. Thanks zubairmasoodi |
|
|
|
|
|
#14 |
|
Junior Member
Join Date: Jul 2009
Posts: 1
|
Here is a solution I have used in the past that at least alleviated the need to add code to every page:
In the Global.asax file: void Application_EndRequest(object sender, EventArgs e) { if (Response.Cookies["ASP.NET_SessionId"] != null) { Response.Cookies["ASP.NET_SessionId"].Domain = ".mydomain.com"; } } tewehner |
|
|
|
|
|
#15 |
|
Junior Member
Join Date: Nov 2009
Posts: 1
|
Hi,
We have tried the same approach suggested by you in one of our application. But the problem is that it is working fine locally at my computer but not on our production server. Is there some other setting I am missing? Could you please suggest some solution? It is bit urgent. Can you please give me a quick suggestion? Thanks in advance. Anil anilchanna |
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ASP.Net Session Cookie Lost on mozilla/netscape After return from cross domain | saurabhm | Software | 3 | 09-18-2009 12:36 PM |
| Session Expired too soon | lidya_usq | Software | 0 | 09-24-2008 02:46 AM |
| How to spawn a session in new window using expectk | Chets | General Help Related Topics | 0 | 10-16-2007 09:34 AM |
| Attempted to access a field that is not accessible by the caller. | reshma24pc | Software | 0 | 07-21-2007 11:51 AM |
| Transfering ASP Session to ASPX Session | kalim | Software | 0 | 07-12-2007 03:38 AM |