How to solve a “HTTP Error 404.3 - Not Found” error?

前端 未结 6 1695
长情又很酷
长情又很酷 2021-02-05 07:21

Simple problem. I start up VS2008 and create a new WCF Service application. This will create a default application with a few test methods showing it works. I press CTRL+F5 and

相关标签:
6条回答
  • 2021-02-05 07:52

    If you faced this problem for the first time. with Windows 8 and IIS 8.0 make sure to activate Windows Communication Foundation HTTP windows feature.

    1. Go to Control Panel select "Programs and features"
    2. From the lift hand side menu select "Turn Windows features on or off".
    3. Expand ".Net Framework 3.5 (includes .NET 2.0 and 3.0)" item
    4. Finally select "Windows Communication Foundation HTTP Activation"
    5. Enjoy your WCF Servcie.
    0 讨论(0)
  • 2021-02-05 07:53

    I had to tick "HTTP Activation" in "Add Role Services" within Windows Server 2012.

    0 讨论(0)
  • 2021-02-05 07:56

    The problem, however, is then to re-register ASP.Net to IIS, which is explained below.

    And also if you're on a 64bit machine always use Framework64 paths: C:\Windows\Microsoft.NET\Framework64\v4.0.30319>aspnet_regiis.exe -iru

    Below is the explanation from Microsoft:

    http://download.microsoft.com/download/0/A/E/0AEB3BC1-506E-4954-8AB1-4FA2EE75985C/ReleaseNotes.docx

    When attempting to run a service that receives messages over the HTTP transport, you may receive an error similar to the following:

    Server Error in '/WCFApplication' Application

    Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

    Description: An unhandled exception occurred during the execution of the current Web request. Review the stack trace for more information about the error and where it originated in the code. Exception Details: System.TypeLoadException: Could not load type 'System.ServiceModel.Activation.HttpModule' from assembly 'System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.

    This error can occur when IIS is installed after installing .NET Framework 4, or if the 3.0 version of the WCF Http Activation module is installed after installing IIS and .NET Framework 4.

    To resolve this problem, you must use the ASP.NET IIS Registration Tool (Aspnet_regiis.exe,) to register the correct version of ASP.NET. This can be accomplished by using the –iru parameters when running aspnet_regiis.exe as follows:

    aspnet_regiis.exe -iru

    And credit, where it's due: Source

    0 讨论(0)
  • 2021-02-05 08:04

    try to install IIS by expanding your Internet information service and then check ASP.Net 3.5 or ASP.Net 4.5 and ISAPI.... in root of world wide......... please look image to more helpenter image description here

    0 讨论(0)
  • 2021-02-05 08:12

    I tried running ServiceModelReg and aspnet_regiis.exe with various flags and added HTTP Activation feature but it still didn't work. What finally worked was adding the following handler manually to my web.config file.

    <system.webServer>
        <handlers>
          <add name="svc-Integrated" path="*.svc" verb="GET,HEAD,POST,DEBUG" type="System.ServiceModel.Activation.HttpHandler, System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" modules="ManagedPipelineHandler" scriptProcessor="" resourceType="Unspecified" requireAccess="Script" allowPathInfo="false" preCondition="integratedMode" responseBufferLimit="4194304" />
    

    My project was running .Net 3.5 and IIS was 7.5 and 7.0.

    0 讨论(0)
  • 2021-02-05 08:19

    Click Start -> Run cmd and type:

    cd "\Windows\Microsoft.NET\Framework\v3.0\Windows Communication Foundation"
    ServiceModelReg.exe -i
    
    0 讨论(0)
提交回复
热议问题