IIS 8.5 Rewrite module 2.0 not working - help badly needed!

Simona Cioroianu 0 Reputation points

Long story short: the dev server got crashed, it was Server 2008 and IIS 7.0.Re-install IIS 8.5, on Server 2012. the re-write module is 2.0.

All rewrites for all sites are using FileMapProvider. No changes there, in the mappings files.
At first run, it gave me a simple 404. After messing with it, I am in the fatal 'HTTP Error 500.50 - URL Rewrite Module Error'

Still, not working and throwing "System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Web.Iis.Rewrite.Providers, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies."

I spent last two days pulling my hair off, no resolve.The rewrite module works, because if I add a simple rule in IIS directly, is fine.

This my code in web.config:

<?xml version="1.0" encoding="UTF-8"?>
<provider name="FileMapMainURLs" type="FileMapProvider, Microsoft.Web.Iis.Rewrite.Providers, Version=, Culture=neutral, PublicKeyToken=31bf3856ad364e35">
<add key="FilePath" value="{DOCUMENT_ROOT}\App_Data\map-file-name.txt" />
<add key="IgnoreCase" value="1" />
<add key="Separator" value="|" />
<rule name="FileMapMainURLsRule" stopProcessing="true">
<match url="(.\*)" />
<add input="{FileMapMainURLs:{R:1}}" pattern="(.+)" />
<action type="Rewrite" url="{C:1}" />
</rule> ................................................

Many, many thanks in advance!

Internet Information Services
Microsoft Technologies based on the .NET software framework.
3,459 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Lex Li (Microsoft) 4,742 Reputation points Microsoft Employee

    You are not supposed to use FileMapProvider as it was provided as part of the Extensibility Samples to show people how to write their own extensions to IIS URL Rewrite module,


    That download is currently not available any more.

    If you want similar functionalities, you might follow this article and write some C# code to achieve the same,