Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

restart/iisreset disables NET.TCP protocol?

Tags:

iis-7

tcp

wcf

was

I'm hosting a WCF service in IIS7 on Windows Server 08, sp2. The service is hosted as its own website and is exposed via a NET.TCP endpoint. The service works perfectly until a restart/iisreset command is issued.

After restart or iisreset, when I make any service call, I receive the following error: 'System.ServiceModel.EndpointNotFoundException: The message could not be dispatched because the service at the endpoint address 'net.tcp://[website]/[service_name].svc' is unavailable for the protocol of the address.. '

The server's event log shows the following error: 'An error occurred while trying to read and instantiate the configured ProcessHandlerType. Exception: System.ArgumentException Message: Unknown protocol ID 'NET.TCP'. StackTrace: at System.Web.Hosting.ProcessHost.StartProcessProtocolListenerChannel(String protocolId, IListenerChannelCallback listenerChannelCallback) '

Question: How do I fix this? Why is the NET.TCP protocol disabled after iisreset? Is it a bug? Am I missing some configuration?

IIS setup details: - Server 08 and 08 R2 - Bindings: http, NET.TCP (808:*) - EnabledProtols: http,NET.TCP. - The identity for the site's appPool is set to a specific user.

Sample code available here: http://drop.io/wcfTcpSampleService

Thanks

like image 738
Kevin McKinley Avatar asked Jun 15 '10 23:06

Kevin McKinley


2 Answers

Solved. The problem is case-sensitivity. In the AdvancedSettings of the web application, the EnabledProtocols field must be lower case ie 'net.tcp' (I just learned this from MS support).

I assumed (foolishly) that 'NET.TCP' should be upper case because of the description of the EnabledProtocols field ("...add those values, such as NET.TCP...").

The strange, unknown issue is why it would work with 'NET.TCP' the first time, but that's another issue.

Thanks for all you help everyone.

like image 106
Kevin McKinley Avatar answered Sep 22 '22 05:09

Kevin McKinley


Can you use different ports for NET.TCP and HTTP protocols?

Update

On my PC everything works as it should, and I have tried both restart and iisreset. I have uploaded in the same place your project including binaries (used Visual Web Developer 2010 Express), and a screenshot of IIS settings. The app pool is set to .NET 4.0 integrated.

iis7 http://www.freeimagehosting.net/uploads/1a727d66ce.png

like image 37
alexandrul Avatar answered Sep 20 '22 05:09

alexandrul