Asp.net中多项目共享Session 选择自 dnyz 的 Blog

 

1.         建立一个空白解决方案blank solution,如:d:\MyProject\MyProject.sln

2.         d:\MyProject下建一个Web Application的根目录d:\MyProject\WebMis并设为http://localhost/WebMis的虚拟目录

3.         WebMis目录下根据模块分别新建目录,如:d:\MyProject\WebMis\Logind:\MyProject\WebMis\CheckOut

4.         VS.net中根据模块新建web application,如:http://localhost/WebMis/Loginhttp://localhost/WebMis/CheckOut

5.         新建后LoginCheckOut两个目录自动被设置为虚拟目录

6.  在WebMis项目中添加LoginCheckOut的项目引用

7.在IIS管理器中删除LoginCheckOut的虚拟目录

8.         删除各项目的global.asax(除根项目)

9.         除去个项目的web.config(除根项目)中的如下代码:
<authentication mode="Windows" />
<sessionState mode="InProc" stateConnectionString="tcpip=127.0.0.1:42424" sqlConnectionString="data source=127.0.0.1;Trusted_Connection=yes" cookieless="false" timeout="20" />
或删掉web.config(若不需要在各目录中进行配置)

10.         编译后,即可运行。

posted @ 2005-11-21 23:13  torome  阅读(211)  评论(0)    收藏  举报