我有一个带有5个WCF服务的Visual Studio解决方案。它们都在同一个项目“MyCompany.MySoftware.Services”中。
这一次,我将它们全部托管在IIS中(我习惯使用Windows服务进行托管,但我计划使用AppFabric,因此我决定更改)并且我已经启用了HTTP和Net.TCP绑定。< / p>
每项服务的配置如下:
<service name="Kipany.Belvedere.Services.Services.AppointmentService"
behaviorConfiguration="GeneralBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="Company.Software.Services.IService1"
name="appointmenthttp"/>
<endpoint address="" binding="netTcpBinding"
bindingConfiguration="netTcpBindingConfig"
name="appointmenttcp"
contract="Company.Software.Services.IService1"/>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
<service name="Kipany.Belvedere.Services.Services.AppointmentService"
behaviorConfiguration="GeneralBehavior">
<endpoint address="" binding="wsHttpBinding"
contract="Company.Software.Services.IService5"
name="appointmenthttp"/>
<endpoint address="" binding="netTcpBinding"
bindingConfiguration="netTcpBindingConfig"
name="appointmenttcp"
contract="Company.Software.Services.IService5"/>
<endpoint address="mex" binding="mexHttpBinding"
contract="IMetadataExchange"/>
</service>
我在这篇文章中读到,在IIS中托管时,我必须让我的netTcp端点没有地址。现在,我的IIS配置了808端口,所以我知道我的所有服务都在使用这个端口。
问题:
1 - Is this a good architecture to use ? 2 - Can I face problems with this configuration ? 3 - What if I want to use every service in a different tcp port ? 4 - The port for tcp binding is configurated in the Default Website but I have the option to fill the 'address' in the endpoint, what happens in this case ? As I have to put ONE port in the Default Website binding, how can I use more than one port in my Web.Config ? 5 - My tcp is using the 808 port but this is my Client's Web.Config:
808端口在哪里?
答案 0 :(得分:0)