如何在本地托管WCF服务而不是http绑定..?

时间:2022-11-19 10:17:52

How to host WCF services locally instead of http binding.. I mean the services should be hosted within the .NET environment and not by using http or netTCP.. Could you please help me with the configuration for the same?

如何在本地托管WCF服务而不是http绑定..我的意思是服务应该在.NET环境中托管,而不是使用http或netTCP。你能帮我配置相同的配置吗?

3 个解决方案

#1


What are you trying to achieve here that can't be performed by using http or tcp settings for the local machine for both ends of the WCF contract? WCF isn't just between machines, you can also set it to communicate between different processes on the same machine.

你想在这里实现什么,不能通过在WCF合同的两端使用本地机器的http或tcp设置来执行? WCF不仅仅位于计算机之间,您还可以将其设置为在同一台计算机上的不同进程之间进行通信。

#2


I think you are confusing between hosting a WCF service and a WCF binding. A WCF service can be hosted in many different applications such as standalone executables, windows services, a web server such as IIS, ...

我认为你在托管WCF服务和WCF绑定之间会感到困惑。 WCF服务可以托管在许多不同的应用程序中,例如独立的可执行文件,Windows服务,IIS等Web服务器......

Once you've found an appropriate host for the service you have to decide what binding to use. A binding is used to specify the transport, encoding, and protocol details required for clients and services to communicate with each other.

找到适合该服务的主机后,您必须决定使用哪种绑定。绑定用于指定客户端和服务相互通信所需的传输,编码和协议详细信息。

Note that choosing a host could further limit the choice of bindings available. For example if you decide to host your service in IIS you could only use HTTP/S as transport and NetTcp is not available (in IIS7 it is available through WAS).

请注意,选择主机可能会进一步限制可用绑定的选择。例如,如果您决定在IIS中托管服务,则只能使用HTTP / S作为传输,而NetTcp不可用(在IIS7中,它可通过WAS使用)。

#3


How to confgiure NetNamedPipeBinding.

如何配置NetNamedPipeBinding。

How to: Host a WCF Service in a Managed Windows Service.

如何:在托管Windows服务中托管WCF服务。

#1


What are you trying to achieve here that can't be performed by using http or tcp settings for the local machine for both ends of the WCF contract? WCF isn't just between machines, you can also set it to communicate between different processes on the same machine.

你想在这里实现什么,不能通过在WCF合同的两端使用本地机器的http或tcp设置来执行? WCF不仅仅位于计算机之间,您还可以将其设置为在同一台计算机上的不同进程之间进行通信。

#2


I think you are confusing between hosting a WCF service and a WCF binding. A WCF service can be hosted in many different applications such as standalone executables, windows services, a web server such as IIS, ...

我认为你在托管WCF服务和WCF绑定之间会感到困惑。 WCF服务可以托管在许多不同的应用程序中,例如独立的可执行文件,Windows服务,IIS等Web服务器......

Once you've found an appropriate host for the service you have to decide what binding to use. A binding is used to specify the transport, encoding, and protocol details required for clients and services to communicate with each other.

找到适合该服务的主机后,您必须决定使用哪种绑定。绑定用于指定客户端和服务相互通信所需的传输,编码和协议详细信息。

Note that choosing a host could further limit the choice of bindings available. For example if you decide to host your service in IIS you could only use HTTP/S as transport and NetTcp is not available (in IIS7 it is available through WAS).

请注意,选择主机可能会进一步限制可用绑定的选择。例如,如果您决定在IIS中托管服务,则只能使用HTTP / S作为传输,而NetTcp不可用(在IIS7中,它可通过WAS使用)。

#3


How to confgiure NetNamedPipeBinding.

如何配置NetNamedPipeBinding。

How to: Host a WCF Service in a Managed Windows Service.

如何:在托管Windows服务中托管WCF服务。