简体   繁体   English

可以通过Internet访问带有net.tcp绑定的WCF服务吗?

[英]Can WCF service with net.tcp bindings be accessed over internet?

I have developed a simple WCF service (hosted in a Windows Service) quite similar to following msdn article. 我开发了一个简单的WCF服务(托管在Windows服务中),非常类似于以下msdn文章。

http://msdn.microsoft.com/en-us/library/ff647180.aspx#Step1 http://msdn.microsoft.com/en-us/library/ff647180.aspx#Step1

How should i deploy it so that it can be accessed over internet using tcp? 我应该如何部署它以便可以使用tcp通过互联网访问它?

有一件事是它将使用与HTTP(80)不同的端口,并且可能被某些防火墙阻止(可能大多数(如果不是全部的话))。

TCP binding is used only when the clients are from the same network. 仅当客户端来自同一网络时才使用TCP绑定。 If your clients are outside of your network you will have to use HTTP protocol like basicHttpBinding or wsHttpBinding. 如果您的客户端不在您的网络中,则必须使用HTTP协议,如basicHttpBinding或wsHttpBinding。

In real time application you have multiple service endpoints with different kind of bindings like for backoffice and stand alone application you use netTcpBinding and for internet application you use wsHttpBinding. 在实时应用程序中,您有多个服务端点具有不同类型的绑定,例如后台和独立应用程序,您使用netTcpBinding,而对于Internet应用程序,您使用wsHttpBinding。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM