0

I am getting a 404.7 error while browsing .svc file in IIS 8.5 (Error message: Not Found The request filtering module is configured to deny the file extension)

I am able to resolve it by adding this code in web.config file:

<system.webServer>
    <security>
      <requestFiltering>
        <fileExtensions allowUnlisted="true">
          <remove fileExtension="." />
             <add fileExtension="." allowed="true" />
        </fileExtensions>
      </requestFiltering>
    </security>
  </system.webServer>

But I am unable to figure out why this error is being thrown in the first place.

I have verified:

1) Request filtering is turned on 2) .svc file is NOT in the list of denied extensions 3) "Allow unlisted file name extensions" is checked in IIS.

With these settings, shouldn't I be able to browse the .svc file without having to add the above code in web.config file? What else am I missing?

user1860689
  • 31
  • 1
  • 3

2 Answers2

0

To resolve the issue you could try below workaround:

1)Go to IIS -> Click Website/Application -> select "Request Filtering" -> click "Allow file name Extension" -> add ".svc" -> OK

2)add the belw code in your web.confgig file:

<handlers>
   <add name=".svc" verb="*" path="*.svc" type="System.ServiceModel.Activation.ServiceHttpHandlerFactory, System.ServiceModel.Activation, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
</handlers>

https://stackoverflow.com/a/12519582

Jalpa Panchal
  • 5,345
  • 1
  • 4
  • 17
0

Just for a complement, In order to support WCF extension in IIS, we should enable the below Windows feature.

  1. Go to control panel
  2. Turn Windows features on or off.
    enter image description here


    Feel free to let me know if there is anything I can help with.
Abraham Qian
  • 6,097
  • 1
  • 3
  • 20