Atalasoft Knowledge Base

HOWTO: Add Verbose Logging to WebDocumentViewer


When encountering erors saving and other errors where you get a vague/minimal error in the error message on the network trace, the handler may return an error message that says {System.Web.Exception} wihtout much useful detail

In order to 'dial up' logging, it is necessary to add some diagnostic listeners to your web.config

In this example we're goint go assume your login username is YOUR_USERNAME. Obviously, here you will change this to your actual username

Alternately, if you want to set the folder to something more generic, just make sure NOT to use a protected directory such as c:\Temp etc.

  • Open your web project in Visual studio
  • Find the web.config file
  • In that file, inside the cloture, paste this in:
      <!-- The Following section can be enabled to add verbose logging for debugging issues with Handlers -->
      <!-- It is suggested to only use this when actively troubleshooting and disabling for production-->
      <!-- For the log filepath in initalizeData set to a directory you have full control over -->
      <!-- SUGGGESTED your user profile directory - make sure to change "YOUR_USERNAME" -->
        <trace autoflush="true"/>
          <add name="TraceLevelSwitch" value="Verbose"/>
          <add name="WebControls" initializeData="c:\users\YOUR_USERNAME\AppData\Local\Atalasoft\webcontrols.log" type="System.Diagnostics.TextWriterTraceListener"/>
          <source name="Atalasoft.dotImage.WebControls" switchName="TraceLevelSwitch">
              <add name="WebControls"/>
  • Save this out then rebuild and refresh your browser to start logging

Last Modified: 5 Months Ago
Last Modified By: Tananda
Rated 1 star based on 1 vote
Article has been viewed 306 times.
Also In This Category