Configure Log files in IIS 7

Log files are very important when tracing errors in both application and IIS level. Below are the steps to configure the logs files in IIS.

  1. Open IIS
  2. Select your Website and Click on it.
  3. In Right Side Pane click on Logging.
  4. In Logging, in Log file Section, Select format(IIS,NCSA,W3C) for  logging and select Fields(Date, time etc…)
  5.  Give the Directory Location for log files In Directory Section.
  6.  In Log file Rollover, Give the Schedule (Weekly, Hourly etc) and Maximum file size and select  remaining options as your requirement.
  7. Right side click on Apply

An attempt was made to load a program with an incorrect format

The error occurs when we are deploying the application in windows 2008 (64 bit) server.In my scenario, my application consist of crystal Report it working on x86 version. So I set option in IIS.
In Application pool–>advanced setting: Enable 32-bit Application:True