How to enable service discovery in IIS?

Damir Dobric Posts

 

Damir@Phone    







       
twitter 

 

WCF 4.0 introduces Service Discovery, which I described here. I is interesting that all samples about this feature implements a service in a console application. As you know, service channels in such kind of application are activated explicitly by calling of Host.Open() method. As you also know service channel of the service hosted in IIS is activated when the first message arrives.

This almost unimportant fact might be in some scenarios show stopper. Examples of such scenarios are hosting of relay bindings of .NET Service Bus in IIS and activating of discovery endpoint. Why?

Discovery Feature is used to discover the service for some consumer. This feature is activated when udpDiscoveryEndpoint is activated and that happens when the channel is activated. In IIS context that means, when first message arrives. If consumer of service does not know how to reach the service it cannot send the message. Because no message has arrived, discovery does not work and consumer cannot use discovery client :)

Not bad!?

To make it working enable service auto start in Windows Server AppFabric.

image

The same can be achieved with following configuration entry:

<configuration>

   . . .
  
<
microsoft.applicationServer>
        <hosting>
            <serviceAutoStart>
                <add relativeVirtualPath="SampleService.svc" />
            </serviceAutoStart>
        </hosting>
    </microsoft.applicationServer>
. . .
</configuration>


Posted Sep 09 2010, 12:18 AM by Damir Dobric
Filed under:

Comments

Luka wrote re: How to enable service discovery in IIS?
on 12-01-2010 14:14

Hello.I was wondering if you knew where to download this:

daenet.dnetfx40Discovery sample

I'm looking for a sample with udp discovery...and maybe a howto guide to actually register this service in appfabric IIS management console.

Thanky ou!

Add a Comment

(required)  
(optional)
(required)  
Remember Me?
developers.de is a .Net Community Blog powered by daenet GmbH.