加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

c# – 读取用户会话时的HttpRuntime CacheInternal NULL引用异常

发布时间:2020-12-15 23:39:46 所属栏目:百科 来源:网络整理
导读:在我们的 Windows服务器上进行一些更新(2008R2,2012) Asp.net应用程序抛出错误: var obj_1 = typeof(HttpRuntime).GetProperty("CacheInternal",BindingFlags.NonPublic | BindingFlags.Static); CacheInternal即将出现,不知道为什么? 以下解决方案无效:(
在我们的 Windows服务器上进行一些更新(2008R2,2012) Asp.net应用程序抛出错误:

var obj_1 = typeof(HttpRuntime).GetProperty("CacheInternal",BindingFlags.NonPublic | BindingFlags.Static);

CacheInternal即将出现,不知道为什么?

以下解决方案无效:(
Solution

enter image description here

解决方法

我找到了解决方案.现在HTTPRuntime类没有CacheInternal属性.为了实现上述任务,我创建了一个全局列表,在Session_Start中的该列表中添加会话,并删除Global.asax的Sessions_end函数中的会话.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读