Can you share the session variables between two .net 2.0+ applications?

后端 未结 4 1229
醉梦人生
醉梦人生 2020-12-10 09:26

I was told this works, but...

I guess I\'m just not getting this, it seems there\'s a hidden step I may be missing, can anyone correct this or point out my mistake?

4条回答
  •  生来不讨喜
    2020-12-10 10:15

    You cannot share sessions between different ASP.NET applications without some custom code. What you did in web.config was to use an out of process sessions, which means that data will no longer reside into memory but into the memory of a dedicated machine. This is useful for server farms and it uses the ApplicationName to know which application the session belongs to. So basically your applications need to have the same name if you want them to share sessions. There are some dirty workarounds though.

提交回复
热议问题