Geeks With Blogs
Cloud9 Azure and Cloud Services, WCF, WF, Dublin, Geneva and Federated Security, Oslo

So lets say you want to test early development builds in a continuously integrated system.
You want to take all your developers code and execute it on a seperate box and be able to test client access to your system remotely.

Yeah you could put it up in staging on Azure but maybe you dont want to do that yet.  Maybe you just want some testers bangin away at it from some remote client.

Well right now thats kinda hard since the development fabric carries a restriction to deny request from non-localhost ips. It only accepts loopback.
Sounds like a job for the .NET 4.0 Router.

Basically the thought is that you need something local that can recast your test request originating outside of your machine to
requests that "originate from your machine" to

The way to do this is simple.  On the machine hosting windows Azure Development Fabric and your visual studio install
Install the WindowsAzurePlatform training kit.  One of the labs will guide you on how to expose WCF Services from the development fabric.
Once you are done with that create a client to your service... The Azure Dev fabric will make you point your WCF clients to the loopback address
This is where the router comes in.
You need to install .NET 4.0.  You might also want to install Visual Studio 2010 Beta 1.
Then you want to get the .NET 40 WCF Samples.
Inside the .NET 4.0 samples theres the famous calculator service but this time with a router in front of it.
You want to change the config file to mimic what i have below.
You want to host the router locally so it can talk to and can also expose an endpoint on 192.168.1.X or something.
Finally you want to take the Calculator client and run it outside of the VM on your host machine or even on another machine altogether.

Dont worry Visual Studio 2010 Beta 1 and Visual Studio 2008 sp1 can run side-by-side.. its actually "encouraged".
also remember to enable the ports or just disable the firewall temporarily

Windows Azure Platform Training Kit - August Update

Windows Communication Foundation (WCF) and Windows Workflow Foundation (WF) Samples for .NET Framework 4.0 Beta 1

Microsoft .NET Framework 4 Beta 1

Visual Studio 2010 Professional Beta 1 – Web Installer

Visual Studio 2010 and .NET Framework 4 Training Kit - May Preview

Config Files....

<WebRole name="WcfService1" enableNativeCodeExecution="false">
      <InputEndpoint name="HttpIn" protocol="http" port="81" />

the SVC style service

<%@ ServiceHost Language="C#" Debug="true" Service="WcfService1.CalculatorService" CodeBehind="Service1.svc.cs" %>

      <service name="WcfService1.CalculatorService" behaviorConfiguration="CalculatorServiceBehavior">
        <!-- Service Endpoints -->
    <!-- ICalculator is exposed at the base address provided by host: http://localhost:8000/servicemodelsamples/service  -->
    <endpoint address="" binding="basicHttpBinding" contract="WcfService1.ICalculator"/>
    <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
    <behavior name="CalculatorServiceBehavior">
     <serviceDebug includeExceptionDetailInFaults="True"/>
          <!-- To avoid disclosing metadata information, set the value below to false and remove the metadata endpoint above before deployment -->
          <serviceMetadata httpGetEnabled="true"/>


      <service behaviorConfiguration="routingData" name="System.ServiceModel.Routing.RoutingService">
            <add  baseAddress=""/>
        <endpoint address="" binding="basicHttpBinding"  name="reqReplyEndpoint"  contract="System.ServiceModel.Routing.IRequestReplyRouter" />
        <behavior name="routingData">
          <serviceMetadata httpGetEnabled="True"/>
          <routing routingTableName="routingTable1" />
      <endpoint name="CalculatorService" address="" binding="basicHttpBinding" contract="*" />
        <filter name="MatchAllFilter1" filterType="MatchAll" />
        <table name="routingTable1">
            <add filterName="MatchAllFilter1" endpointName="CalculatorService" />


      <endpoint address=""
                contract="Microsoft.Samples.ServiceModel.ICalculator" />


Posted on Monday, August 31, 2009 4:31 PM WCF , Azure | Back to top

Comments on this post: Accessing Azure Development Fabric Hosted WCF endpoint from remote clients

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Juan Suero | Powered by: