public class WebErrorHandler : object
Member | Description | |
---|---|---|
Constructor | Public constructor requires that an exception is passed in. Generally you'll want to do this is in Application_Error and pass in in the InnerException of the error: | |
Browser | The client's browser string. | |
CompactFormat | If true returns only the error message and URL. | |
ContentSize | The size of the POST buffer if data was posted. | |
ErrorMessage | The runtime error message thrown by the application. | |
FullUrl | The completely qualified Url to this request. Example: http://www.west-wind.com/webstore/item.aspx?sku=WWSTOREDOTNET | |
IPAddress | The client's IP address | |
LastError | ||
Locale | The Locale string returned by the browser | |
LogFileName | Name of the logfile. Filename is relative to the virtual Web root. | |
Login | The username of the user attached if the user is authenticated. | |
PostBuffer | Content of the POST buffer if the page was posted. The size is limited to 2k. Larger buffers are stripped. | |
QueryString | The complete querystring. | |
RawUrl | The raw Web relative URL that caused this exception to occur. Example: /WebStore/Item.aspx?sku=WWHELP | |
Referer | The referring Url that was used to access the current page that caused the error. | |
RetrieveSourceLines | Determines whether the routines attempt to retrieve Source Code lines. | |
SourceCode | The source code if available for the error that occurred. The code will include the 5 surrounding lines before and after. | |
StackTrace | Stack trace listing as available from the runtime compiler | |
Time | The time the error was logged. | |
ClearXmlLog | Tries to delete the log file. public bool ClearXmlLog();
|
|
LogErrorToSql | Logs the error to Sql Server through the WebRequestLog public bool LogErrorToSql(string ConnectionString);
|
|
LogErrorToXml | Logs an error to the XML file specified in the public bool LogErrorToXml(bool LogAsString);
public bool LogErrorToXml();
|
|
Parse | Parses the Exception into properties of this object. Called internally by LogError, but can also be called externally to get easier information about the error through the property interface. public bool Parse();
|
|
ShowXmlLog | Displays the log as an ASP.Net response. public bool ShowXmlLog();
|
|
ToString | public virtual string ToString();
|