Welcome to Windows Communication Foundation (WCF)
Top Tasks :

WCF WS-Discovery Protocol Implementation

File Details
Downloads: 2011 File Size: 257.2kB
Posted By: vipulm Views: 31904
Date Added: Thu, Dec 21 2006
This sample demonstrates how to use the Windows Communication Foundation to enable run-time discovery of services within ad-hoc networks using the WS-Discovery protocol.  Clients can search for available services based on a Type and/or Scope (Probe), or search based on a specific Endpoint Reference (Resolve).  A matched service will then respond using a ProbeMatch or ResolveMatch, as appropriate.  New services can also announce their arrival on the network (Hello) or declare their departure from the network (Bye).  These operations are defined as part of the WS-Discovery specification.

Comments
 

DickP said:

Great stuff. How do I run ServiceFinder from a windows form?
Sat, Jan 06 2007 11:32
 

DickP said:

Answer to my own question: stick it in worker thread.
Sat, Jan 06 2007 12:01
 

DickP said:

What is the best way to enable endpoints to respond to unicast http discovery probes over the web? My scenario is this: User has heard there is a public service on the web at http://www.someaddress.com. She wants to resolve the address to obtain service metadata. I could extend the ServiceModel metadata to include my custom data, but I already use ws-discovery on the intranet so it would be nice to use the same components. (The ws-discovery standard covers unicast probes to a DP proxy.) Is it just a matter of starting up a new FindListener with a standard WsHttpBinding as the InputBinding? Cheers
Mon, Jan 22 2007 8:43
 

DCliffe said:

There are two primary requirements to plug another binding into this sample: - supports duplex (either composite like the provided UDP-HTTP or otherwise) - supports manual addressing (in order to set/copy the ReplyTo) Unfortunately, wsHttpBinding or wsDualHttpBinding do not support both of these by default. In order to make this work, create a custom binding that is composite duplex using 2 one-way Http Bindings (see "ProtocolUtility.cs" to see UDP-HTTP composite duplex). Thanks! -- Dave
Tue, Jan 23 2007 21:32
 

DickP said:

Thanks. So the roadmap is basically this: create unicast versions of all the methods in ProtocolUtility; modify FindListener to add an optional unicast endpoint; and make logic changes in ServicePublisher to prevent duplicate announcements.
Wed, Jan 24 2007 3:29
 

DR.C.B.BAGGA said:

I AM TRYING TO UNDERSTAND IF REGISTRIES FIXERS/MECHANICS OR SIMILAR ADs.ON WEB,I AM USING WINDOWS XP PROFESSIONAL SP2,DO I NEED TO INSTAL REGISRY FIXERS. cbbagga
Sat, Feb 24 2007 8:04
 

online car insurance... said:

http://saneenviro.or...
Tue, Apr 17 2007 7:55
 

qianjh said:

why i can not find the service in vista's network browser?
Thu, Aug 02 2007 2:05
 

Bandu said:

I can find Service in Vista network when Firewall is OFF on Service side. But I got another issue. If I used different machine one got domain and another is jsut workgroup, i got an exception in service host side.... Here is the stack trace.............(sorry ist a long one.. :)) System.ServiceModel.EndpointNotFoundException was unhandled by user code Message="Could not connect to http://ga:8000/Discovery/9109db45-109f-4fde-9e63-6c7f71ef1b4b/bdd5d087-560b-441e-913b-32cdf32cf8d9. TCP error code 10060: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond. " Source="mscorlib" StackTrace: Server stack trace: at System.ServiceModel.Channels.HttpOutput.WebRequestHttpOutput.GetOutputStream() at System.ServiceModel.Channels.HttpOutput.Send(TimeSpan timeout) at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.SendRequest(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestChannel.Request(Message message, TimeSpan timeout) at System.ServiceModel.Channels.RequestOneWayChannelFactory.RequestOutputChannel.OnSend(Message message, TimeSpan timeout) at System.ServiceModel.Channels.OutputChannel.Send(Message message, TimeSpan timeout) at System.ServiceModel.Channels.InternalDuplexChannelListener.ServerCompositeDuplexChannel.Send(Message message, TimeSpan timeout) at System.ServiceModel.Dispatcher.DuplexChannelBinder.Send(Message message, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout) at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs) at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation) at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message) Exception rethrown at [0]: at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) at Microsoft.ServiceModel.Samples.Discovery.Protocol.IFindResponseContract.ProbeMatchOperation(ProbeMatchesMessage response) at Microsoft.ServiceModel.Samples.Discovery.Protocol.ProbeRequest.Reply(ProbeMatches probeMatches) in F:\Samples\wcf ws-discovery sample\src\Protocol\ProbeRequest.cs:line 100 at Microsoft.ServiceModel.Samples.Discovery.Protocol.ProbeRequest.Reply(IEnumerable`1 propertiesCollection) in F:\Samples\wcf ws-discovery sample\src\Protocol\ProbeRequest.cs:line 83 at Microsoft.ServiceModel.Samples.Discovery.ServicePublisher.HandleRequest(ProbeRequest request) in F:\Samples\wcf ws-discovery sample\src\Library\ServicePublisher.cs:line 68 at Microsoft.ServiceModel.Samples.Discovery.Protocol.FindListener.Microsoft.ServiceModel.Samples.Discovery.Protocol.IFindContract.ProbeOperation(ProbeMessage request) in F:\Samples\wcf ws-discovery sample\src\Protocol\FindListener.cs:line 61 at SyncInvokeProbeOperation(Object , Object[] , Object[] ) at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs, Object[]& outputs) at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc& rpc)
Fri, Aug 10 2007 21:03
 

SiYuan said:

Don't support IIS?
Fri, Dec 07 2007 4:08
 

Lampous said:

Does anyone know if this library will support more than one ServiceHost on one physical machine?
Wed, Apr 02 2008 9:56

Add Comment

Name (required)
Web Site (optional)
Comment (required)
Add

Copyright © 2006 Microsoft Corporation. All Rights Reserved. | Terms of Use | Privacy Statement | Contact Us