none
Unknown protocol ID Net.TCP

    Question

  • Hello,
     
    I'm migrating an N-Tier app that uses WCF for the middletier.  I the UI communications with WCF using Net.TCP.  Have this setup on dev machines and a Windows 2008 server and has been working fine for quite a while.

    Publishing the app to a new 2008 server, enabled WCF activation, net.tcp, net.tcp port sharing etc.  The services show as being started in services.  Everything is the same on this machine as the other as far as I can tell.

    However, when the UI website tries to communicate with the WCF server, I get the following Error in the app log.

    Event ID 1334 source asp.Net 2.0.50727

    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)

    I'm about running out of ideas on this.  No search hits or anything thus far.

    Any ideas?

    Thanks.

    P.S.  I'd like to add I can use the Add Service Reference to a project and setup a reference just fine.  It's almost like WAS is having trouble utilizing Net.TCP.  The puzzling thing is this is a brand new Windows 2008 install with just sql 2008 and Visual Studio 2008 now installed. (Installed after I noticed the problem.)  I've disabled the Firewall, UAC just to make sure those were causing the problem.  Still no luck.
    kfrost
    Wednesday, February 18, 2009 4:17 AM

Answers

  • Documenting the process of removing WCF non-http activation.

    Upon reboot, when I try to connect I get the expected exception.

    The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

    Check event viewer and see an expected Warning where my client app through an exception that resulted in the message above.  This is to be expected because I don't have net.tcp setup on the machine.

    Install
    Go into server manager/Add Features/.Net Framework 3.0 Features/WCF Activation and make sure HTTP and Non HTTP Activation are checked.

    After the install finishes, go into services to make sure the services show up and are started.

    I run netstat -a before the install completes and there is nothing listening on port 808.

    After install, verify proper services are started, netstat -a again 
    TCP    0.0.0.0:808            W2k8-KF:0              LISTENING

    Stop and start iis
    Look at advanced properties on the default web site
    http:*:80:,net.tcp:808:*,net.pipe:*,net.msmq:localhost,msmq.formatname:localhost

    Check the event log and see the following info events

    Listener Adapter protocol 'net.tcp' successfully connected to Windows Process Activation Service.

    Now I try to open my client app and I still get an error but no exception listed above.  Now the WCF Tracing is working and see I have another issue I need to straighten out. 

    Very wierd, again this is a brand new install with SQL 2008, .Net 3.5 SP 1 and now i have Visual Studio Pro SP 1 on it just for troubleshooting these types of issues.  Some how WAS got screwed upand a uninstall, reboot and reinstall seems to have fixed the issue.


    kfrost
    • Marked as answer by kfrost Wednesday, June 24, 2009 8:38 PM
    Wednesday, February 18, 2009 5:31 PM

All replies

  • Hi

    Have checked the window services are running perfectly , the name of the window service are given below.

    • NetTcpActivator     - windows service
    • NetTcpPortSharing   - window service

    Regards,
    PHIJO MATHEW PHILIP.


    PHIJO MP
    Wednesday, February 18, 2009 4:13 PM
  •  There is no NetTcpActivator that I can recall.

    The Net.Tcp Listener Adapter as well as the Net.Tcp Port Sharing Service are running.

    I can look in the event log and see where WAS has bound to the Net.Tcp.  (Can't recall exactly what the info event states.)


    kfrost
    Wednesday, February 18, 2009 4:17 PM
  • Hi

    Have u configured the IIS 7.0 for net.tcp binding in window server 2008.

    Regards,
    PHIJO MATHEW PHILIP.

    PHIJO MP
    Wednesday, February 18, 2009 4:20 PM
  • Yes.  If you right click on the default website and got to advanced properties, bindings show as:

    http:*:80:,net.tcp:808:*,net.pipe:*,net.msmq:localhost,msmq.formatname:localhost

    Enabled protocals for the default website (Even though I have never had to set these on the default website but rather than my application directories) is http,net.TCP


    If you click on Bindings for the Default Web Site, the Site Bindings popup shows and net.tcp is present and it's Binding info reads as 808*.  Really just the same info as above.


    I right click on my WCF app directories and go into Advanced Properties, Enabled Protocols reads http,net.TCP

    If I didn't have net.tcp enabled on the machine, my client app just shows an exception that the communication failed but there has never been an exception logged in the Event Viewer.

    You try to connect a couple of times and the app pool actually gets shut down and you have to go restart it.  That doesn't and should not happen if it's a issue of net.tcp not being configured.  Or at least I would think it wouldn't because if it were, I could just create an app to go out and hit IIS 7 servers trying to establish a net.tcp connection and cause the site to crash.

    With that said, I'm not saying I haven't overlooked something simple but this is about the 6th machine I've set net.tcp up on and I've been through the issues of not starting a service or configuring the binding in IIS.  Again that has never resulted in the app pool crashing.

    Thanks.
    kfrost
    Wednesday, February 18, 2009 4:34 PM
  • Hi,

    Can you please create you own website in IIS 7.0 and configure your website to accept the net.tcp protocol. Please use port number 9000 or 8000 when you configure the port.

    Inside this website please add the necessary files that is required for was hosting in IIS 7.0.

    Can you please create your own application pool in IIS 7.0 in window server 2008.

    Please test with simple console client , in another machine and see whether you able to consume the wcf service and able to get the desired result from the window server 2008.

    Please do it , if it is required.

    Regards,
    PHIJO MATHEW PHILIP.

    PHIJO MP
    Wednesday, February 18, 2009 4:46 PM
  • Phijo,

    What exactly does this buy me?  This is a brand new install.  It's setup the way I want it setup.  It's identical to a another W2k8 machine and several Vista machines.

    The only thing here, is I see you and several others specifying a port but I leave it to the default of 808*.  Then for the clients connecting I don't ever specify a port.  Thought that was what the port sharing was for, to take the request and bind it to a dynamic port?  When you run the service configuration, it doesn't specify a port either.  By the error it's like WAS has trouble interfacing with the Net.TCP port sharing.

    If I do all you state here and it does work, really hasn't done me any good because it needs to work off the default website just the way I have it configured.  It's never been an issue before.

    I'm going to uninstall the WCF activation features reboot and try installing them again and see where I stand.

    Don't get me wrong I appreciate the responses but your last proposal doesn't buy me anything even if it works because I'm still in the same boat and have to get the problem resolved.

    Thanks.




    kfrost
    Wednesday, February 18, 2009 4:56 PM
  • Hi


    Did you try to test services using a simple application in the same machine(in the window server 2008).  Are u able to satisfactory result in the same window server 2008.

    REGARDS,
    PHIJO  MATHEW PHILIP.

    PHIJO MP
    Wednesday, February 18, 2009 5:25 PM
  • Hi

    Since in your query , you mentioned about the migrating N-Tier appliation and wcf service middle tier. Are u migrating a existing application in .net framework 2.0 to .net framework 3.0 or 3.5.

    Regards,
    PHIJO MATHEW PHILIP.

    PHIJO MP
    Wednesday, February 18, 2009 5:29 PM
  • Documenting the process of removing WCF non-http activation.

    Upon reboot, when I try to connect I get the expected exception.

    The communication object, System.ServiceModel.Channels.ServiceChannel, cannot be used for communication because it is in the Faulted state.

    Check event viewer and see an expected Warning where my client app through an exception that resulted in the message above.  This is to be expected because I don't have net.tcp setup on the machine.

    Install
    Go into server manager/Add Features/.Net Framework 3.0 Features/WCF Activation and make sure HTTP and Non HTTP Activation are checked.

    After the install finishes, go into services to make sure the services show up and are started.

    I run netstat -a before the install completes and there is nothing listening on port 808.

    After install, verify proper services are started, netstat -a again 
    TCP    0.0.0.0:808            W2k8-KF:0              LISTENING

    Stop and start iis
    Look at advanced properties on the default web site
    http:*:80:,net.tcp:808:*,net.pipe:*,net.msmq:localhost,msmq.formatname:localhost

    Check the event log and see the following info events

    Listener Adapter protocol 'net.tcp' successfully connected to Windows Process Activation Service.

    Now I try to open my client app and I still get an error but no exception listed above.  Now the WCF Tracing is working and see I have another issue I need to straighten out. 

    Very wierd, again this is a brand new install with SQL 2008, .Net 3.5 SP 1 and now i have Visual Studio Pro SP 1 on it just for troubleshooting these types of issues.  Some how WAS got screwed upand a uninstall, reboot and reinstall seems to have fixed the issue.


    kfrost
    • Marked as answer by kfrost Wednesday, June 24, 2009 8:38 PM
    Wednesday, February 18, 2009 5:31 PM
  • Hi

    In your query the statement "I'm migrating an N-Tier app that uses WCF for the middletier."

    When you are  migrating the application and using a new technology like wcf , have u tested the application in one dev box , before deploying in the window server 2008. You are hosting the wcf middletier in dev box IIS 7.0 and your UI is consuming the service . Are u able to do this successfully.

    Why I am saying this because you are not creating the n-tier application using .net framework 3.0 or 3.5. Have checked the feasbility before migrating from net 2.0 to net.3.0 or net 3.5

    Have consulted with software architects in your organization before going ahead ,

    Regards
    PHIJO MATHEW PHILIP.

    PHIJO MP
    Wednesday, February 18, 2009 5:36 PM
  • PHIJO MP said:

    Hi

    Since in your query , you mentioned about the migrating N-Tier appliation and wcf service middle tier. Are u migrating a existing application in .net framework 2.0 to .net framework 3.0 or 3.5.

    Regards,
    PHIJO MATHEW PHILIP.


    PHIJO MP



    Everything is .Net 3.5.  I'm running these demo's off a home office server and putting them on a rack server to go into a hosting company.  So it's just a straight copy of the files, and setting them up in IIS.  About as straight forward as you can get.

    I am the architect and yes I've been using WCF pretty much since it's release.  It's been on Windows 2008 since it's release.  If you search on the message I posted, there are no hits.  I've went throught the config 2 afternoons and never thought I would need to uninstall and reinstall the activation on a newly installed server.




    kfrost
    Wednesday, February 18, 2009 5:36 PM
  • kfrost, did you ever get resolution on this issue. I have the exact same issue. The app works fine on the dev and test environments but on a fresh installed server with the roles and features installed exactly the same I get this generic error message.

    Mbrantley

    Wednesday, June 24, 2009 8:34 PM
  • kfrost, did you ever get resolution on this issue. I have the exact same issue. The app works fine on the dev and test environments but on a fresh installed server with the roles and features installed exactly the same I get this generic error message.

    Mbrantley


    If you are talking about the original problem, I uninstalled and reinstalled WAS to resolve the problem.
    kfrost
    Wednesday, June 24, 2009 8:38 PM
  • Did you install non-http activation during the install? (you can add it on the application server role IIRC)

    Did you allow net.tcp as a protocol in the IIS application configuration?
    Richard Blewett, thinktecture - http://www.dotnetconsult.co.uk/weblog2
    Twitter: richardblewett
    Wednesday, June 24, 2009 9:00 PM
    Moderator
  • Hi Kfrost, Do you mean that unistalling and Installing WAS resolved the problem of net.tcp (the issue you started this thread with)? Now the client is not throwing the "faulted state" exception and app pools are working fine? Windows is not allowing me to uninstall WAS without uninstalling its dependencies like complete IIS. I can't do the same as I am facing the problem in the production environment. Pls. Suggest.
    Anupam Shrivastava
    Thursday, July 16, 2009 1:39 PM
  • Were you able to resolve the issue, you posted on Wednesday, February 18, 2009 5:31 PM?
    Anupam Shrivastava
    Sunday, July 19, 2009 3:22 PM
  • In the "Advanced Settings" dialog box for the WCF service, ensure to enable NET.TCP by entering "net.tcp" (without the quotes) for Enabled Protocols.

    Note the lower case "net.tcp"; entering "NET.TCP" (upper case) will result in the following exception after IIS is restarted:

    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)

    --- Taiwo

     

     

    • Edited by taiwoa Saturday, May 07, 2011 10:17 PM Wrong formatting
    • Proposed as answer by taiwoa Saturday, May 07, 2011 10:18 PM
    Saturday, May 07, 2011 10:15 PM
  • restarting the Windows Prosses Activation Service (WAS) from windows services solved the problem for me. No need to reinstall WAS.

    • Proposed as answer by Mustafa Halim Thursday, June 14, 2012 2:42 PM
    Thursday, June 14, 2012 2:41 PM