0
votes
WCF Service Hosting - Stack Overflow
Asked
Viewed 109 times
0

I host a WCF Service in IIS, but it is giving following error:-

HTTP Error 404.17 - Not Found

The requested content appears to be script and will not be served by the static file handler.

I developed this service in .Net Framework 4.0 and applied basicHttpBinding for SOAP.

I also tried aspnet_regiis.exe -i command but still my problem did not get resolved.

Http Binding is as follow:-

  </service>
</services>
<behaviors>
  <serviceBehaviors>
    <behavior name="ServBehave">
      <serviceMetadata httpGetEnabled="true"/>
      <serviceDebug includeExceptionDetailInFaults="false"/>
    </behavior>
  </serviceBehaviors>

</behaviors>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>

3
  • You'll need to show us the server-side and client-side configs and the code you're using to access the service
    – marc_s
    Jul 4 2015 at 11:04
  • I set Http windows feature and now it's working but now issue comes of accessing data from Service. Now I am trying to access Service using my machine ip address following by my service detail as MyMachineIP/wcfservice/Service1.svc/GetUserData But It is giving 404 not found error. Jul 4 2015 at 11:41
  • 1
    Again: show us your configs! And also: basicHttpBinding is a SOAP binding - you cannot test a SOAP binding by just browsing to it with a browser - you'll need a SOAP-capable test tool, like the WCF Test Client or Soap UI
    – marc_s
    Jul 4 2015 at 11:44
0

You need to make sure WCF is installed and enabled on the server.

  1. Make sure that the .NET 3.5.1 Framework is installed.

  2. Ensure that “Windows Communication Foundation HTTP Activation is enabled and installed. This can be access via the Program Features in the Control panel under “Turn Windows Features on or off”.

  3. Execute below command from command prompt running as Administrator (elivated privileges ).

"%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i

    Your Answer

    By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

    Not the answer you're looking for? Browse other questions tagged or ask your own question.

     
    1
    You'll need to show us the server-side and client-side configs and the code you're using to access the servicemarc_s
    I set Http windows feature and now it's working but now issue comes of accessing data from Service. Now I am trying to access Service using my machine ip address following by my service detail as MyMachineIP/wcfservice/Service1.svc/GetUserData But It is giving 404 not found error.Hardik Shah
    Again: show us your configs! And also: basicHttpBinding is a SOAP binding - you cannot test a SOAP binding by just browsing to it with a browser - you'll need a SOAP-capable test tool, like the WCF Test Client or Soap UImarc_s

    1 Answers

    0
    votes

    You need to make sure WCF is installed and enabled on the server.

    1. Make sure that the .NET 3.5.1 Framework is installed.

    2. Ensure that “Windows Communication Foundation HTTP Activation is enabled and installed. This can be access via the Program Features in the Control panel under “Turn Windows Features on or off”.

    3. Execute below command from command prompt running as Administrator (elivated privileges ).

    "%WINDIR%\Microsoft.Net\Framework\v3.0\Windows Communication Foundation\ServiceModelReg.exe" -i