Azure Training Kit – WCF Problems

After having recently downloaded the Azure Training Kit I launched straight into trying to build some of the demos to get my head around how Azure works, especially the use of the storage areas (Blobs, Tables and Queues) that developers can access to store various data within there cloud application.

Whilst doing this the first demo tell us to create a WCF web service which can then be consumed by a windows console app and later a WorkerRole. However, after following all the steps in the demo my Console app and WorkerRole kept throwing up errors when I tried to consume the service. Browsing to the URL of the service then gave me the following error:

Could not find a base address that matches scheme http for the endpoint with binding BasicHttpBinding. Registered base address schemes are [].

After, hours of searching and help from a fellow tweeter and Azure enthusiast (@DavidBurela) I have managed to get around this problem.

First thing to do is to remove the following section of code from the web.config file of the WebRole:

   1: <serviceHostingEnvironment>
   2:     <baseAddressPrefixFilters>
   3:         <add prefix="http://localhost"/>
   4:     </baseAddressPrefixFilters>
   5: </serviceHostingEnvironment>

Then make sure that the service input endpoint within in the ServiceDefinition and the client.endpoint both are connection via the same port:


   1: <client>
   2:     <endpoint address="http://localhost:83/MessageLogger.svc" 
   3:               binding="basicHttpBinding"
   4:               bindingConfiguration="BasicHttpBinding_IMessageLogger"
   5:               contract="RDService.IMessageLogger"
   6:               name="BasicHttpBinding_IMessageLogger" />
   7: </client>


   1: <InputEndpoints>
   2:   <InputEndpoint name="HttpIn" protocol="http" port="83" />
   3: </InputEndpoints>

This should make sure that the WCF service functions correctly.




Comments (2)

  1. ewstepp says:

    Dominic, thank you very much for your post.  I’ve been working through the Hands-on Labs this weekend and I got hung up on this one, too.

    With some additional experimentation, it seems that only the web.config change is needed.  You could have left the other components as the instructions told you to set them and everything still works.

Skip to main content