Click here to Skip to main content
15,890,717 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have project using WCF service. I am calling the service through ajax and handlers. Locally it is working fine, when I host it in IIS8 I am getting Webservice call failed 404 error.

Can anybody please help me on this...

Here is the binding used in webconfig
XML
<system.serviceModel>
    <behaviors>
      <endpointBehaviors>
        <behavior name="ServiceAspNetAjaxBehavior">
          <enableWebScript/>
        </behavior>
        <behavior name="AjaxCallAspNetAjaxBehavior">
          <enableWebScript/>
        </behavior>
        <behavior name="AJAXCallsAspNetAjaxBehavior">
          <enableWebScript/>
        </behavior>
      </endpointBehaviors>
    </behaviors>
    <serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true"/>
    <services>
      <service name="Service">
        <endpoint address="" behaviorConfiguration="ServiceAspNetAjaxBehavior" bindingConfiguration="webBinding" binding="webHttpBinding" contract="Service"/>
      </service>
      <service name="AjaxCall">
        <endpoint address="" behaviorConfiguration="AjaxCallAspNetAjaxBehavior" bindingConfiguration="webBinding" binding="webHttpBinding" contract="AjaxCall"/>
      </service>
      <service name="AJAXCalls">
        <endpoint address="" behaviorConfiguration="AJAXCallsAspNetAjaxBehavior" bindingConfiguration="webBinding" binding="webHttpBinding" contract="AJAXCalls"/>
      </service>
    </services>
    <bindings>
      <webHttpBinding>
        <binding name="webBinding">
          <security mode="None"/>
        </binding>
      </webHttpBinding>
    </bindings>
  </system.serviceModel>
Posted

I have enabled the Http Activation for WCF service under Windows feature, and it worked for me.

Refer: http://stackoverflow.com/questions/7083533/http-error-404-17-not-found[^]

Thanks for the Help...
 
Share this answer
 
404 - means not found. HTTP 404[^]. You should check the URL you are invoking, I suspecting the URL contains port number. Please correct your URL and try again
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900