views:

144

answers:

1

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!

+1  A: 

After some more digging around, I got it to work. I had to do this:

  1. Run the Visual Studio Command Line as Administrator.
  2. go to C:\Windows\Microsoft .NET\Frameword v3.0\Windows Communication Foundation
  3. run "servicemodelreg -i"

That will install all of the things needed to view the service.

landyman