ASP.NET 2.0 Session terminating unexpectedly

徘徊边缘 提交于 2020-02-06 05:47:06

问题


We have an ASP.NET 20 Web Application and all of sudden we start experiencing a weird session timeout which is kicking out the users from the system. The system also invokes WCFs that uses membership authentication and every other invocation we are getting this error:

The message could not be processed. This is most likely because the action 'http://tempuri.org/MyWCFService' is incorrect or because the message contains an invalid or expired security context token or because there is a mismatch between bindings. The security context token would be invalid if the service aborted the channel due to inactivity. To prevent the service from aborting idle sessions prematurely increase the Receive timeout on the service endpoint's binding.

No code changes were performed over the application and I am clueless what could be the cause or how to trace this problem any help on those matters will mean a lot.


回答1:


What kind of session state are you using? If it's InProc, then perhaps the IIS Application Pool is recyling, which would clear out the sessions and could be a potential cause of your problem.

You should also check if there is anything in your Session_Start or Session_End events that could cause any problems, and if so, consider adding error handling and/or logging here.




回答2:


try to change

<security mode="None">

to

<security mode="Message">

in the config file



来源:https://stackoverflow.com/questions/23807728/asp-net-2-0-session-terminating-unexpectedly

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