Locked How to discover services

  • 2012年4月16日 13:47
     
      コードあり

    Hello,

    I have succesfully deployed a service that autostarts and also exposes a discovery-endpoint (with a CustomBinding).
    Based on the messages in the EventLog the service works fine.
    I also created a Client that calls the service. This works fine as long as I use explicit endpoints but when I try to use a dynamic endpoint based on

    http://msdn.microsoft.com/en-us/library/dd456792.aspx

    I get a message that the CustomBinding cannot be found.
    This is my clientsideconfiguration

    <system.serviceModel>
    	<bindings>
    		<customBinding>
    			<binding name="discoBindingConfiguration">
    				<discoveryClient>
    					<endpoint kind="discoveryEndpoint"
    							  address=http://localhost/ServiceClients/DiscoveryClient
    							  binding="customBinding"
    							  bindingConfiguration="basicHttpBinding"/>
    					<findCriteria duration="00:00:10" maxResults="2">
    						<types>
    							<add name="WhiteRebel.AutoStart.Contract.v1.IAutoStart"/>
    						</types>
    						<scopes />
    					</findCriteria>
    				</discoveryClient>
    				<textMessageEncoding messageVersion="Soap11"/>
    				<httpTransport />
    			</binding>
    		</customBinding>
    	</bindings>
    	<client>
    		<endpoint
    			kind="dynamicEndpoint"
    			binding="CustomBinding"
    			contract="WhiteRebel.AutoStart.Contract.v1.IAutoStart"
    			endpointConfiguration="discoBindingConfiguration" />
    	</client>
    </system.serviceModel>
    

    I can't find very much information about the specific requirements for the customBinding, like

    a. Should the adress="http://localhost/. . . . " conform to some rules?
    b. Is there a specific binding I should use (other than basicHttpBinding).
    c. Anything else I didn't think of.

    I have looked on the internet to find more information, but most of it is unspecific. Also the information in "Programming WCF Services" O'Reilly 3rd edition isn't clear on this subject. It seems esy enough but I can't get it to work.

    The service is running on a Windows 2008 R2 server with AppFabric.
    The client is running on a Windows 7 platform.
    There are not other machines in the network.

    Nico

すべての返信