Handling shared sessions in Asp.net

Source: Internet
Author: User

 

1. Problem description:

There are four modules in system S: M1, M2, M3, and M4. Each module is a web application. Sessions in one module cannot be read from other modules.

2. cause:

A web application is equivalent to a site, and the Session cannot be shared between the application and the application.

3. solution:

1) include four web applications in the same solution

(Note: Adjust the. webinfo file to make the solution work properly)

2) create a new web application Main, which is included in solution S and directly stored in the S directory (that is, corresponds to the virtual directory S ).

3) Add references to the other four applications in the Main application.

4) regenerate the Main application. At this time, the dll of the M1, M2, M3, and M4 modules related to the Main module will be generated under the Sin directory.

5) Adjust the web. config file

Delete all sections except the etting section in the web. config module of M1, M2, M3, and M4. (You can also delete the web. config in the four modules and only keep the web. config file in the S directory .)

The following operations will affect the development environment:

6) Delete goble. acax

Delete the goble. acax file in the M1, M2, M3, and M4 modules.

7) Delete the virtual directories corresponding to the four modules M1, M2, M3, and M4.

8) Success


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.