(帮忙)关于SESSION报错的问题!

crystal002576 crystal002576 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
已经配置了SQL SERVER存SESSION
并且 IIS上各种会话状态都设置了600分钟了,包括WEB.CONFIG什么的,都配置了过期时间了

但是在打开某个页面30分钟左右不动的时候,还是会报错,报错显示的内容如下

报错信息如下:

Server Error in '/' Application.
--------------------------------------------------------------------------------

Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:


Line 44: {
Line 45: Button b = Page.Master.FindControl("MainContent").FindControl(strs[i]) as Button;
Line 46: if (SqlHelper.mylimit.IndexOf(strs[i].ToString()) == -1)
Line 47: {
Line 48: if (b != null)

是执行到
Line 46: if (SqlHelper.mylimit.IndexOf(strs[i].ToString()) == -1)
这一行的时候报错
这个代码是按照不同的角色权限加载菜单

谁能帮忙看看问题在哪里
...全文

相关推荐

评论 12
收藏 已收藏
分享
返回顶部
crystal002576
.NET社区 62,275 成员 668,968 内容