Search code examples
wcf

WCF - The message could not be dispatched because the service at the endpoint address ... is unavailable for the protocol of the address


Ok, can I vent?? I am so sick and tired of this. I'm working away most of the day and the WCF services are working great. Next time I run my app and make a WCF call, bam! the tcp socket is no longer available. I have searched high and low to solve this and there is no real solution. The only solution I can find is to reboot the machine which is a huge time-waste and burden. Restarting WPA service, net.tcp service, IIS, etc. does not do a thing. Logging off and back on does not fix it. Only a reboot fixes this issue. I do nothing except run my app again making a WCF call, and this crap happens. There are no configuration issues with anything. I have been dealing with this for months and cannot find any specific reason or solution as to why this happens. It happens with my firewall on or off, does not matter.

Any insight from anyone? I think there is truly a bug in the WCF / net.tcp layer that is causing this. I even get it on a production 2008 R2 server when sometimes making a Web.config change, so I have learned to stop the IIS, WPA, net.tcp, etc. services prior to the change then restart them. What a pain.

I'm using .NET4 all around, VS2010, all service packs, etc. applied. Everything is the most current.

Excuse me while I reboot.....

Can anyone help with this?


Solution

    1. Open a command prompt
    2. Navigate to c:\windows\microsoft.net\framework64\v4.0.30319
    3. Register the service model using the command "ServiceModelReg.exe -r"

    Credits go there http://kumaranbose.blogspot.be/2010/08/cryptic-wcf-nettcp-errors.html