A couple months ago I wrote a post on how to host WCF services in IIS that expose themselves as endpoints on the Windows Azure AppFabric Service Bus. The principal challenge in this scenario is that IIS/WAS relies on message-based activation and will only launch the host after the first request comes in. However, until the host is launched the service will not connect to the Service Bus, and consequently will never receive a message. A classic catch-22.
The solution I proposed was to leverage the Application Warm-Up Extension for IIS 7.5, which will proactively load and initialize processes before the first request arrives. While this is acceptable, I’ve found a better solution using the Windows Server AppFabric Autostart (thanks to conversations with Ron Jacobs).
[...] After reading this post, I recommend you look at Autostart WCF Services to Expose them as Service Bus Endpoints where I provide a new (and potentially better) way to activate the WCF service using Windows Server [...]
I want to Host WF (WorkFlow) Services in IIS with Service Bus Endpoints – I managed to get your sample to work with no problems whatsoever but what ever I try I cannot expose a Workflow service as a service bus endpoint.
Basically I create a new Workflow Service Activity (.xamlx), add a simple sequence, then expose the service as a .svc endpoint:
I have then taken your web.config and amended it so that it references my .svc.
Finally I then host within IIS and configure the service so that it AutoStarts using the instructions you outline above.
When I view the xxx.servicebus.windows.net endpoint nothing is discovered.
When I view the endpoints for the Service in IIS (under Services, View Endpoint (for the .svc)) there is only one endpoint and that is the default endpoint created for a workflow service, i.e. a namedPipe.
Can you shed any light into what I am doing wrong???
[...] After reading this post, I recommend you look at Autostart WCF Services to Expose them as Service Bus Endpoints where I provide a new (and potentially better) way to activate the WCF service using Windows Server [...]
I just wanted to thank you for taking the time to post this screencast as it presents a viable solution to a problem I’ve been pondering all day.
Many thanks
Richard.
Hi Wade,
I want to Host WF (WorkFlow) Services in IIS with Service Bus Endpoints – I managed to get your sample to work with no problems whatsoever but what ever I try I cannot expose a Workflow service as a service bus endpoint.
Basically I create a new Workflow Service Activity (.xamlx), add a simple sequence, then expose the service as a .svc endpoint:
ServiceHost Service=”MyActivity.xamlx” Factory=”System.ServiceModel.Activities.Activation.WorkflowServiceHostFactory,System.ServiceModel.Activation,Version=4.0.0.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35″
I have then taken your web.config and amended it so that it references my .svc.
Finally I then host within IIS and configure the service so that it AutoStarts using the instructions you outline above.
When I view the xxx.servicebus.windows.net endpoint nothing is discovered.
When I view the endpoints for the Service in IIS (under Services, View Endpoint (for the .svc)) there is only one endpoint and that is the default endpoint created for a workflow service, i.e. a namedPipe.
Can you shed any light into what I am doing wrong???
Thanks
Richie
Wade,
Is it possible to use the auto start feature of ASP.NET 4.0 to start up a WCF service as used in:
http://weblogs.asp.net/scottgu/archive/2009/09/15/auto-start-asp-net-applications-vs-2010-and-net-4-0-series.aspx