ASP.NET Session Lost When Use Web Garden Settings

廉价感情. 提交于 2019-12-25 16:47:18

问题


I have an ASP.NET MVC (.NETFramework 4.5) application, when I hosted (IIS-7.5), I set max Worker process to 5, And Set Session State to StateServer And Set a static machinekey, after all my session is null,

Why?

Is there any settings that I lost?

any suggestion?


回答1:


The problem that I found is so wired, when I use web-garden or web-farm the object that stored in session must be serializable but in regular we don't need this.

So I just add a serializable attribute above the object that stored in session and all things is OK!.



来源:https://stackoverflow.com/questions/23191853/asp-net-session-lost-when-use-web-garden-settings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!