2

I have setup ASP project but when I am opening my local url in browser I am getting below error:

Parser Error Message: Could not load file or assembly 'Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545b0627da60a5f' or one of its dependencies. The system cannot find the file specified.

Line 16:     <compilation debug="true" targetFramework="4.6.2" defaultLanguage="c#">
Line 17:       <assemblies>
Line 18:         <add assembly="Microsoft.Web.Iis.Rewrite.Providers, Version=7.1.761.0, Culture=neutral, PublicKeyToken=0545B0627DA60A5F" />
Line 19:       </assemblies>
Line 20:     </compilation>
Rai Vu
  • 1,595
  • 1
  • 20
  • 30
Yogesh Karodiya
  • 225
  • 5
  • 15
  • A quick way to check if you have the `Microsoft.Web.Iis.Rewrite.dll` is to look at `%ProgramFiles%\Reference Assemblies\Microsoft\IIS` and see if the dll is there. If not, install Rewrite Module mentioned by Christopher Hamm. If you do, then use Visual Studios to [add or edit the reference to the rewrite dll](https://learn.microsoft.com/en-us/iis/extensions/url-rewrite-module/developing-a-custom-rewrite-provider-for-url-rewrite-module) – nugenjs Jan 30 '18 at 18:32

2 Answers2

2

Had the same problem using a DB provider. Fixed it by installing the URL Rewrite extensibility code samples.

During the installation make sure to select the "Runtime" option in the custom setup. This will register the sample providers in .NET Global Assembly Cache so that they can be used by URL Rewrite Module.

Using Custom Rewrite Providers with URL Rewrite Module

stibay
  • 1,200
  • 6
  • 23
  • 44
1

You error message indicates that the DLL is missing. Have you installed the IIS URL Rewrite Module?

For more another possible solution you can look at this post.

exeraph
  • 81
  • 1
  • 8