locked
Event Code: 3005 An unhandled exception has occurred. RRS feed

  • Question

  • User-718146471 posted

    This is only appearing in the event viewer; the web application still runs and generates no client side.  If it would give me a specific web page, it would probably be easier to troubleshoot.  I inherited this project, not my design.  It has done this since day one and I have had no luck figuring out where it comes from.  All I know is the event viewer logs one of these every couple minutes or so.  I've tried to figure this out for months with no luck.  Any advice I thank you in advance!

    Event code: 3005
    Event message: An unhandled exception has occurred.
    Event time: 2/19/2009 1:41:40 PM
    Event time (UTC): 2/19/2009 6:41:40 PM
    Event ID: 83d95f94ac674e39889a37e4d558a865
    Event sequence: 2477
    Event occurrence: 300
    Event detail code: 0
     
    Application information:
        Application domain: /LM/W3SVC/XXXXXXXXXXX/Root-1-XXXXXXXXXXX 
        Trust level: Full
        Application Virtual Path: /
        Application Path: C:\XXXXX\XXXXX 
        Machine name: XXXXXXXXXXX 
     
    Process information:
        Process ID: 1860
        Process name: w3wp.exe
        Account name: NT AUTHORITY\NETWORK SERVICE
     
    Exception information:
        Exception type: NullReferenceException
        Exception message: Object reference not set to an instance of an object.
     
    Request information:
        Request URL: 
        Request path: 
        User host address: 
        User: 
        Is authenticated: False
        Authentication Type: 
        Thread account name: domain\username 
     
    Thread information:
        Thread ID: 8
        Thread account name: domain\username 
        Is impersonating: False
        Stack trace:    at ASP.global_asax.Session_End(Object sender, EventArgs e)

    Thursday, February 19, 2009 2:24 PM

Answers

  • User-504499122 posted


    Thread information:
        Thread ID: 8
        Thread account name: domain\username 
        Is impersonating: False
        Stack trace:    at ASP.global_asax.Session_End(Object sender, EventArgs e)



    You seem to have some code in the Session_End handler thats causing the exception. Please check the code in this handler and if nothing is obvious, please post the code here

    You dont see any errors in the application page's is probably because of couple of reasons.. One, it might be a non-fatal error and second and the main reason is, the Session_End handler is executed by the asp.net internally because of internal timeout, not due to some user actions.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 20, 2009 2:01 PM

All replies

  • User-504499122 posted


    Thread information:
        Thread ID: 8
        Thread account name: domain\username 
        Is impersonating: False
        Stack trace:    at ASP.global_asax.Session_End(Object sender, EventArgs e)



    You seem to have some code in the Session_End handler thats causing the exception. Please check the code in this handler and if nothing is obvious, please post the code here

    You dont see any errors in the application page's is probably because of couple of reasons.. One, it might be a non-fatal error and second and the main reason is, the Session_End handler is executed by the asp.net internally because of internal timeout, not due to some user actions.
    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Friday, February 20, 2009 2:01 PM
  • User-718146471 posted

    Well, it isn't anything obvious to me in the code.  Here is the code from global.asax which I think is the closest I can get to where the problem is coming from.  As you can see, not much to this file.

    <%@ Application Language="C#" %>
    <script runat="server">

    void Application_Start(object sender, EventArgs e)
    {
    // Code that runs on application startup
    }
    void Application_End(object sender, EventArgs e)
    {
    // Code that runs on application shutdown
    }
    void Application_Error(object sender, EventArgs e)
    {
    // Code that runs when an unhandled error occurs
    }
    public void Session_Start(object sender, EventArgs e)
    {
    //Session["UserId"] = User.Identity.Name.Substring(User.Identity.Name.IndexOf("\\") + 1);
    //Session["PrsnId"] = (new BasePage()).GetDescription("PRSN", Session["UserId"].ToString());
    //if (string.IsNullOrEmpty(Session["PrsnId"].ToString()))
    //{
    // Response.Redirect(Request.ApplicationPath + \\AppStructure\\Error.aspx?InvalidUser=yes);
    //}
    // Response.Redirect("SessionExpired.aspx");
    }
    void Session_End(object sender, EventArgs e)
    {

    // Is this where the problem is? I want to kill all session variables at the timeout. 

    HttpContext.Current.Session.Abandon();
    Response.Redirect("SessionExpired.aspx");

    }
    </script>

    Tuesday, March 17, 2009 1:41 PM
  • User-718146471 posted

    Well, what I think is happening is when someone just closes their browser instead of clicking logout, it drops the session which seems to be what is logging the error.  Unless I can take the X away from them, there probably is no solution to this problem.

    Monday, May 4, 2009 2:24 PM
  • User-482979953 posted

     Hi,

     I'm also experiencing the similar problem( exact warning message in event viewer). Did you get out of that error message? If so, can you help me? i think its some thing we should do with timer events

     

    Thanks

    UnfortunateDev

    Thursday, September 24, 2009 3:07 PM
  • User-718146471 posted

    If I remember correctly, I resolved this by turning off the health monitoring in dot net. You can turn it off via the web config. Of course, when you make the change, stop and start your web application. This should get them to go away...

    <healthMonitoring enabled="false" />

    Here is some light reading for you that explains how to use it. I haven't really found any use for it yet :)

    http://aspnet.4guysfromrolla.com/articles/031407-1.aspx


    Tuesday, November 3, 2009 4:19 PM