ASP.NET XML Parsing Error: no element found Line Number 1, Column 1 Error

后端 未结 12 2348
[愿得一人]
[愿得一人] 2021-02-20 05:44

Hey I found a weird temperamental page which randomly gives me the following error

XML Parsing Error: no element found
Location: http://kj2011/site_2011/nonprofit-data         


        
12条回答
  •  陌清茗
    陌清茗 (楼主)
    2021-02-20 06:06

    To find the issue you are having with this problem.

    In your global.asax file add:

    void Application_Error(object sender, EventArgs e)
    {
        Exception objErr = Server.GetLastError().GetBaseException();
        string err =    "Error caught in Application_Error event" +                
                "\n \nError Message: " + objErr.Message.ToString()+ 
                "\n \nStack Trace: " + objErr.StackTrace.ToString();
    
           System.Diagnostics.EventLog.WriteEntry("MYApplication", err, System.Diagnostics.EventLogEntryType.Error);
        Server.ClearError();     
    } 
    

    You can set a break point here or log this message into an EventLog.

提交回复
热议问题