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

I ran into a situation where I was trying out WS-Discovery.

you know the new WCF capability that allows you dynamically find services on your local network.

Which would come in handy if say some company created software that ran on windows and hosted some services that could automatically link up with co-workers clients like windows phone and maybe even the plasma screen or microsoft surface computer?


Well i ran into a little hiccup today where enabling the virtual network interface for Hyper-V on my laptop caused discovery to throw an exception...


I ran the DiscoveryChat solution from the .NET40 training kit february drop

(the "end" solution at

and in the OnFindCompleted method

( the method that asynchronously returns with the discovery client is done )

FindCompletedEventArgs.Error returned an exception


here are the details...


FindCompletedEventArgs.Error is not null.

[System.ServiceModel.CommunicationException] = {"An unexpected socket exception occurred when sending data.  See inner exception for details."}

InnerException = {"A socket operation was attempted to an unreachable host"}

StackTrace = "\r\nServer stack trace: \r\n   at System.Runtime.AsyncResult.End[TAsyncResult](IAsyncResult result)\r\n   at System.ServiceModel.Channels.ServiceChannel.SendAsyncResult.End(SendAsyncResult result)\r\n   at System.ServiceModel.Channels.ServiceChannel.EndCal...

source mscorlib.


next steps


after bumbling around in different places i started playing with my network interfaces...
I have three network interfaces in my Control Panel\Network and Internet\Network Connections

1. Local Area Connection (Broadcom NetLink (TM) Gigabit Ethernet)

2. Local Area Connection - Virtual Network (probably from Hyper-V)

3. Wireless Network Connection (Intel(R) WiFi Link 5300 AGN)

i disabled 2 and 3 and discovery worked

i re-enabled and reproduced the error

i enabled everything then disabled Virtual Network and.. ooo nooo .. it worked!

I then disabled the Virtual Network and it didnt work :(

Just to make sure I turned on one of the Hyper-V servers and browsed a website from inside the VM pinged it pinged from the VM to my host and to other machines on the network finally i enabled everything then disabled Virtual Network it worked!

I then disabled the Virtual Network and it didnt work :(

Posted on Wednesday, February 17, 2010 7:35 PM WCF | Back to top

Comments on this post: WS-Discovery acting flaky from Host with Hyper-V virtual interface enabled

# re: WS-Discovery acting flaky from Host with Hyper-V virtual interface enabled
Requesting Gravatar...
ok seems to be fine now.

at some point It statred to work and then a reboot brought the problem back.
I removed the network interface from the virtual network manager and created a new one with all the defaults.

that seemed to have fixed the problem even after a reboot.

maybe it was some flaky underlying configuration for that particular virtual interface? i dunno.
Left by juan suero on Feb 17, 2010 9:17 PM

Your comment:
 (will show your gravatar)

Copyright © Juan Suero | Powered by: