netTcpBinding or wsHttpBinding
Asked Answered
I

5

17

I have a WCF Service hosted as Windows Service and client is an ASP.Net application consuming WCF Service methods.

In process of implementing security, I am confused over which among netTcpBinding/wsHttpBinding will be suitable for my case.

Most likely all the applications in scene (WCF Service, Windows Service, ASP.Net Website) will be sitting on different servers in our office, thus in an Intranet. ASP.Net website will be accessed by users over Internet.

Though, I can always use wsHttpBinding here, will it be suitable to set the service endpoint using netTcpBinding in my case?

Illiteracy answered 10/11, 2009 at 16:2 Comment(0)
B
14

Check this out for a comparison of all the different built in bindings:

Configuring System-Provided Bindings - MSDN

As for your case, as long as it's the web server contacting the WCF service and you don't need to provide an endpoint for any external consumers of the service...netTcpBinding should be up to the job.

Billingsgate answered 10/11, 2009 at 16:11 Comment(2)
Thanks for your reply. I think I still need to specify the end point otherwise how will I add reference to the client Website... please correct me if I am missing something. Or did you mean something else when you say... 'you don't need to provide an endpoint for any external consumers of the service'Illiteracy
When you say website, I assumed you meant a ASP.NET site running on your hardware on your network. If so, any connections to the WCF service will be made from the Web Server to your service before being returned to the client. If you want 3rd parties to connect to your service, then wsHttpBinding would be better because it wouldn't tie them to a platform.Billingsgate
F
10

You can expose your service over more than one binding if you wish, so you could actually use both.

However, if you control both client and service and they both use WCF, netTcpBinding is much faster. Unless you have a firewall between those two, I would choose that.

Fillister answered 10/11, 2009 at 16:13 Comment(0)
B
6

Use netTcpBinding instead wsHttpBinding if you are willing to trade interoperability for performance knowing that you can easily cancel the trade if you are not satisfied with the results (it's a matter of changing config values).

Balikpapan answered 10/11, 2009 at 16:14 Comment(0)
J
6

Since your WCF Services will be accessed by applications sitting in your office (INTRANET), I would go with netTcpBinding.

In an intranet scenario, it is recommended that you use netTcpBinding unless you have a specific requirement to use other bindings such as wsHttpBinding. By default, netTcpBinding uses binary encoding and transport security, which delivers better performance.

Following URLS will help to get more information

http://msdn.microsoft.com/en-us/library/cc949026.aspx

http://msdn.microsoft.com/en-us/library/ms730879.aspx

Jollification answered 10/11, 2009 at 16:17 Comment(0)
R
1

Since your WCF service is a windows service +1 for netTcpBinding. Hosting netTcpBinding on IIS is difficult.

Rosemaria answered 3/12, 2013 at 12:23 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.