Enabling IIS Rewrite Module Logging

269 Views Asked by At

I am using IIS 7.5 on Windows 2008 Server R2 and have installed the IIS Rewrite Module v2.0. I am trying to enable logging to see exactly what rewrite rule is being used. Based on research I have learned that I need to modify (update) C:\Windows\System32\inetsrv\config\applicationHost.config. In order to do so I have created a NEW XML schema file called "RewriteLogging.xml" and have placed it in C:\Windows\System32\inetsrv\config\schema directory. The file contains the following code:

<!--
IIS Rewrite Logging
-->

<configSchema>

  <sectionSchema name="system.applicationHost/RewriteLogging">
    <attribute name="RewriteLog" type="string" defaultValue="C:\inetpub\logs\LogFiles\rewrite.txt" />
    <attribute name="RewriteLogLevel" type="int" defaultValue="9" />
  </sectionSchema> 

</configSchema>

After restarting the web server I notice that the applicationHost.config file's date and time stamp get updated but my new directives are not getting added.

So here are my questions:

  1. Am I approaching this the correct way?
  2. Am I correct in creating a separate XML file and placing it in the schema directory?
  3. Should I be creating a NEW section Schema name or should I be using an existing one? If so which one?
  4. Am I using the correct syntax in the XML file? When I open it up in a browser I am not seeing any errors which is encouraging.
  5. Am I missing something altogether or forgetting an important step?

Any help would be GREATLY appreciated.

0

There are 0 best solutions below