![]() ![]() |
|
Open Client Developer's Guide | |
Search | Index | Glossary | | |
![]() |
|
![]() |
![]() |
![]() |
Logging ExceptionsASP.NET introduces a new application-level event, Application_Error, that can be handled within the ..\FileNet\IDM\Web\FNOpenClient\Global.asax file. This method gets called during the processing of a Web request, whenever an unhandled exception occurs either within your application or another component. The .NET framework also includes a mechanism that writes these unhandled exceptions to a Microsoft Windows Event Log named IdmWSXLog. While developers are encouraged to also use IdmWSXLog for logging exceptions of interest, they are recommended to only log essential information. By using this mechanism, developers can obtain specific information about both the calling request that caused the exception, such as:
and the actual Exception object that encapsulates the error information. When notifying events, developers are recommended to structure event log calls along a separate “error path” within the application, rather than scattering the calls throughout the main code path. For example: Then, at the page level, developers can use the Page_Error event to handle errors on a page:
Doing so will reduce the risk of decreasing performance as a result of event logging. Using the Trace LogASP.NET provides a very powerful tracing capability to aid debugging and testing your Web application. ASP.NET allows you to enable tracing at the application level in Web.Config. Otherwise, you can view the application trace log by browsing the "trace.axd" page from your Web application. ASP.NET provides powerful tracing functionality that can be used to assist in debugging and testing Web applications. Tracing can be enabled at the application level, by specifying the following in the ..\FileNet\IDM\Web\FNOpenClient\Web.Config file:
Once tracing has been enabled for the application, each page in the application will execute any page-level trace statements that they contain. Whenever pageOutput="true", the trace information is displayed at the bottom of the corresponding page. The application trace log can be viewed within the Web application by navigating to the http://localhost/idmwsx/trace.axd page in the browser. To activate the trace log for a specific Web aspx page, set Trace to “true” in the page control declaration:
To add additional information to the trace log, use the Write method of the Trace object:
|
||||
![]() |
|