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
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.
When the rewrite
of the url in web.config
has a problem - the browser send 404 error. Try to comment all the rules
and check again if the 404 error arise.
In my case it was the AjaxControlToolkit.dll
that was missing from the bin folder. Adding a breakpoint in the Application_Error
method in global.asax
as suggested above allowed me to find this out.
Just for the future reference, in case people come here from google
According to this thread, there are many different reasons to get this error.
In my case this caused by overriding
override void Render(System.Web.UI.HtmlTextWriter writer)
and I have not called base.Render(writer);
at the end of overridden function.
I met the same problem, in my case, I lost a ';' in a syntax.
some time This type of error occurs when you have app_offline.html
file in your directory.When ASP.Net found a file names app_offline.htm
in the root of a web application directory, it shut-down the application, unload the application domain from the server, and stop processing any new incoming requests for that application. ASP.NET also then respond to all requests for dynamic pages in the application by sending back the content of the app_offline.htm
file. The default content is an error message.