好像是session丢失的问题 进入网站后 几秒钟session里的东西就没了 配置文件里用进行修改吗

解决方案 »

  1.   

    customErrors mode设置一下,显示的详细一些
      

  2.   

    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: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  Stack Trace: 
    [NullReferenceException: Object reference not set to an instance of an object.]
       webShow.userinformation.setTB(UserInfo userinfo) in H:\Auction\919\h\Auction\webShow\userinformation.aspx.cs:235
       webShow.userinformation.Page_Load(Object sender, EventArgs e) in H:\Auction\919\h\Auction\webShow\userinformation.aspx.cs:98
       System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
       System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +34
       System.Web.UI.Control.OnLoad(EventArgs e) +99
       System.Web.UI.Control.LoadRecursive() +47
       System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061 
    --------------------------------------------------------------------------------
    Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42 
    webShow.userinformation.setTB(UserInfo userinfo) in H:\Auction\919\h\Auction\webShow\userinformation.aspx.cs:235
    这行对应的代码
    curretntUser=(UserInfo)Session["currentUser"];
    this.userNameTB.Text = userinfo.Username;应该是session东西丢了吧 怎么解决啊 有人知道没有
      

  3.   

    把网站重新发布一遍就O了,试过,应该是你发布之后又修改里面的内容造成的,使bin目录下的dll文件不相符了
      

  4.   

    重新发布后是好了 但用了一段时间后这个错误又出来了 还是session的问题
      

  5.   

    加长session的时间,修改配置文件,再在IIS中修改session的默认时间
      

  6.   

    我用的是租的空间啊 没法改iis 我的配置文件里已经改成timeout=1000了