Asp.net自定义Redis会话状态提供程序错误 [英] Asp.net custom Redis session state provider buging
问题描述
你好
我有一个运行良好的ASP.Net应用程序.我只是将会话状态从InProc更改为如下所示的自定义Redis,并且代码是
I have an ASP.Net application working fine. I just changed my session state from InProc to custom redis like below, and the code
Response.Redirect(url,false)不再起作用.没有错误,什么也没有显示.如果我放回< sessionState mode ="InProc", cookieless ="true"超时="30"/一切正常.有人知道为什么吗?
Response.Redirect(url,false) is not working anymore. Not errors displaying no nothing. If I put back <sessionState mode="InProc" cookieless="true" timeout="30"/> everything works fine. DOes somebody knows why?
推荐答案
我找到了解决方案.
I found the solution.
首先,我没有看到任何错误,因为我的页面被包裹在telerik ajax控制面板中.删除后,我可以在任何ASp.net应用程序中看到错误的详细信息(当然是web.config customerror ="Off").其次,问题是 那就是我添加到Redis会话中的实体不可序列化.需要在每个类的顶部添加[Serializable]属性.
First of all I didnt see any error because my page was wrapped up into a telerik ajax control panel. Once I removed it I could see error details like in any ASp.net application (web.config customerror="Off" of course). Secondly the problem was that, my entities I was adding to the Redis session were not serializable. Need to add [Serializable] Attribute on top of each class.
希望获得帮助.
这篇关于Asp.net自定义Redis会话状态提供程序错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!