First, I greatly appreciate any suggestions. I'm having difficulty using the IIS URL Rewrite Module to Block Bots. I cannot get it to work for the website, but if I can apply the same rewrite configuration to an application of the website it works perfectly. The same configuration works perfectly on my development server on the default website, using shared configuration.
Failed Tracing doesn't return anything and the server returns the 500 error when the configuration is applied.
I believe that I've manage to isolate the issue to using the "FileContainsProvider" Provider. I can add the provider without error, but when I place it in the condition the server returns the 500 error (See configuration section below). If I enter a specific bot name, it works fine (<conditions><add input="{HTTP_USER_AGENT}" pattern="BadCrawler" /></conditions>.
Failed Attempts to Resolve:
1. Run in local configuration.
2. Reinstalled the essential sample providers.
3. Reinstalled url rewrite module.
4. Reboot the server.
5. Use full unc for text file location.
6. Verified that application pool has access to file location.
Configuration Section In Question:
<rewrite><providers><provider name="FileContains" type="FileContainsProvider, Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545b0627da60a5f"><settings><add key="FilePath" value="{DOCUMENT_ROOT}\App_Data\WebBotList.txt" /><add key="IgnoreCase" value="1" /></settings></provider></providers><rules><rule name="FileContainsProviderTest" stopProcessing="true"><match url=".*" /><conditions><add input="{FileContains:{HTTP_USER_AGENT}}" pattern=".+" /></conditions><action type="AbortRequest" /></rule></rules></rewrite>