Asp.net handles the issue of sharing sessions between different Web applications on a site

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 is generated under the S \ bin 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.