(帮忙)关于SESSION报错的问题!
已经配置了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)
这一行的时候报错
这个代码是按照不同的角色权限加载菜单
谁能帮忙看看问题在哪里