0

I have a learning application that implements the most important endpoints in a sole service. I am implementing net.tcp + wsHttp + BasicHttp and WebHttp, They all work great except for net.tcp. When i access it through the browser it tells me the following:

The protocol 'net.tcp' is not supported. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The protocol 'net.tcp' is not supported.

Seems like a fairly common problem as I researched through the internet and concluded that because I was on xp using it locally I can't. And when I do the request I get a Socketexception with connection refused code.

But then again I made another project with only net.tcp and its endpoints and bindings and it works! So it most likely means I am not using IIS. I'm still a beginner in wcf, it tells me it is hosted by WCF Service host.

Can someone explain to me what can I do to make it work on windows xp?

Thanks

Jose Luis
  • 3,307
  • 3
  • 36
  • 53
  • http://stackoverflow.com/questions/201004/why-cant-i-connect-to-a-wcf-service-with-net-tcp-but-i-can-with-http – jeroenh Jan 26 '12 at 15:01
  • 1
    Have you thought why you would need all those bindings? Interoperability is good but you already have 2 interpretable bindings (web and basic) and **net.tcp is least interpretable**. – Aliostad Jan 26 '12 at 15:04
  • What do you mean access through the browser? – John Saunders Jan 26 '12 at 19:18

2 Answers2

1

Yes, you are correct - Net.TCP is not available on IIS 5.1 (Windows XP).

To use Net.TCP on an XP machine you have two hosting options:

  1. Self-hosted service (you write the program that hosts the service, using ServiceHost
  2. Windows Service hosted - your service is hosted in a Windows Service.
  3. IIS - HTTP only.

Refer to Hosting Services for an overview and comparison of the various methods to host a WCF service.

Tim
  • 28,212
  • 8
  • 63
  • 76
0

Browsers (and therefore IIS serving them) use HTTP.

TCP is a lower level protocol that would require a custom client to communicate with (such as a Windows App). The WCF Service host is an utility that can host your service for you whilst debugging. Normally you would write a proper host (exe or Windows service).

GazTheDestroyer
  • 20,722
  • 9
  • 70
  • 103