0

I was given just a folder with an .asmx and previously compiled /bin folder with DLLs. I'm trying to run this web service on my local machine but I'm getting an error.

So far I did the following:

  1. Installed IIS
  2. Created an application 'myWebService' under 'default web site' in IIS
  3. Pointed to the c:\inetpub\wwwroot\myWebService

when I browse to http://localhost/myWebService

HTTP Error 404.3 - Not Found The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map

dev.e.loper
  • 35,446
  • 76
  • 161
  • 247
  • 1
    Have you seen https://stackoverflow.com/questions/4388066/the-page-you-are-requesting-cannot-be-served-because-of-the-extension-configura –  Dec 09 '19 at 23:52

1 Answers1

0

As far as I know, the 404.3 error means there is no handler which could handle the asmx file when the request comes to the IIS.

I suggest you could firstly check you have the webservicehanlderfactory in your application's handler mapping. enter image description here

If there is no such handler mapping, I suggest you could try below solution to install it.

For the server:

Go to Server Manager > Add roles and features Select your server from the server pool Go to Features > WCF Services I selected all categories then installed

For the Windows10:

Open the control panel > Windows features > Select the IIS >World wide web service and enable below settings:

enter image description here

Besides, if you want to host the asmx on the IIS, you should also have the right web.config file.

I suggest you could ask the provider to get the config file. If you don't get it, you couldn't run the web service well.

Web.config example:

<?xml version="1.0"?>
<configuration>

  <appSettings>
    <add key="aspnet:UseTaskFriendlySynchronizationContext" value="true" />
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.8" />
    <httpRuntime targetFramework="4.8"/>
  </system.web>
  <system.serviceModel>
    <behaviors>
      <serviceBehaviors>
        <behavior>
          <!-- To avoid disclosing metadata information, set the values below to false before deployment -->
          <serviceMetadata httpGetEnabled="true" httpsGetEnabled="true"/>
          <!-- To receive exception details in faults for debugging purposes, set the value below to true.  Set to false before deployment to avoid disclosing exception information -->
          <serviceDebug includeExceptionDetailInFaults="false"/>
        </behavior>
      </serviceBehaviors>
    </behaviors>
    <protocolMapping>
        <add binding="basicHttpsBinding" scheme="https" />
    </protocolMapping>    
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
  </system.serviceModel>
  <system.webServer>
    <modules runAllManagedModulesForAllRequests="true"/>
    <!--
        To browse web app root directory during debugging, set the value below to true.
        Set to false before deployment to avoid disclosing web app folder information.
      -->
    <directoryBrowse enabled="true"/>
  </system.webServer>

</configuration>
Brando Zhang
  • 22,586
  • 6
  • 37
  • 65