WCF Web Service Gives 404 error in Azure

Posted by landyman on Stack Overflow See other posts from Stack Overflow or by landyman
Published on 2010-04-12T22:46:39Z Indexed on 2010/04/12 22:53 UTC
Read the original article Hit count: 838

Filed under:
|
|

I'm new to using WCF and Azure, but I have a WCF Web Service that works correctly when debugging in Visual Studio. I set the startup project to Azure, and I get 404 errors for any URL I try related to the service.

Here is what I think is relavant code: From IWebService.cs

[OperationContract]
[WebGet(UriTemplate = "GetData/Xml?value={value}", ResponseFormat=WebMessageFormat.Xml)]
string GetDataXml(string value);

and from Web.config:

<system.serviceModel>
  <services>
    <service name="WebService" behaviorConfiguration="WebServiceBehavior">
      <!-- Service Endpoints -->
      <endpoint address="" binding="webHttpBinding" contract="IWebService" behaviorConfiguration="WebEndpointBehavior"></endpoint>
      <endpoint address="ws" binding="wsHttpBinding" contract="IWebService"/>
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    </service>
  </services>
  <behaviors>
    <serviceBehaviors>
      <behavior name="WebServiceBehavior">
        <serviceMetadata httpGetEnabled="true"/>
        <serviceDebug includeExceptionDetailInFaults="true"/>
      </behavior>
    </serviceBehaviors>
    <endpointBehaviors>
      <behavior name="WebEndpointBehavior">
        <webHttp/>
      </behavior>
    </endpointBehaviors>
  </behaviors>
</system.serviceModel>

I have tried changing the binding to 'basicHttpBinding', but that had no luck.

Thanks in advance for any help!

© Stack Overflow or respective owner

Related posts about wcf

Related posts about Azure