Today I had some trouble getting the net.tcp endpoint of a WCF service up and running. HTTP was working just fine, but trying to access the net.tcp endpoint I kept getting this error:
The message could not be dispatched because the service at the endpoint address 'net.tcp://[host]/[service].svc' is unavailable for the protocol of the address.
I tried everything: checked my net.tcp configuration, restarted IIS and the Net.Tcp Listener Adapter at least a couple of times. Nothing worked.
Luckily, a bit of Googling let me to this post:
Which (of course) suggested that I had a look at my servers event log. This showed a bunch of errors like this:
An error occurred while trying to start an app domain protocol listener channel.
Message: Server cannot access application directory '[SOME MISSING FOLDER]'. The directory does not exist or is not accessible because of security settings.
The reason being that the web server had a couple of web sites pointing to non-existing folders. Removing these I got another error, but after restarting IIS (and thereby also the Net.Tcp Listener Adapter) everything worked just perfectly.