views:

106

answers:

1

Hello everyone,

I am using Tomcat to host JSP and using IIS 7.0 to host aspx (C# + .Net 3.5 + VSTS 2008), and I have some session transfer issue from JSP page to ASPX page. JSP page is in one domain and all other aspx pages are in another domain. The issue is, I can not transfer session from aspx web page A to aspx web page B. I want to know anything wrong.

Here are more details,

  1. I have a jsp page contains some frames (to mesh-up content), and one frame is using aspx web page A as source of the frame;
  2. In aspx web page A, in page_load, I will initialize session and save session variable "customerID" in current session;
  3. In aspx web page A, I have a link points to aspx web page B (A and B belong to the same IIS 7.0 web site on a web server);
  4. I find when the jsp page is loaded, the session of aspx web page A will be initialized correctly in asp.net page_load method, and content of page A could be displayed correctly as a frame in jsp page;
  5. the issue is, when user clicks web page B link (in aspx web page A) in the frame inside the jsp page, web page B can not get the session initialized in step 4.

Is it by design session can not be passed? My confusion is why session information can not be passed from aspx page A to aspx page B, since they are both belong to the same IIS 7.0 web site?

BTW: I have tested that if I access aspx web page A directly in IIS 7.0 and then clicks link to aspx page B to access page B, session could be passed to page B correctly.

thanks in advance, George

+1  A: 

Session is persisted per AppDomain. In IIS you can have multiple application pools that host different ASP.NET applications in the same site. An ASP.NET application is hosted in a virtual directory that has an application pool associated to it. If page A and page B belong to different application pools in IIS you cannot share session between them.

Darin Dimitrov
Page a and page b belong to the same app pool. I am wondering it is the iframe issue? Since page a is hosted as a iframe in jsp page, and the jsp page is in another domain?
George2