У меня есть решение Visual Studio с 5 службами WCF. Все они находятся в одном проекте "MyCompany.MySoftware.Services".
На этот раз я размещаю их все в IIS (я привык размещать с использованием служб Windows, но я планирую использовать AppFabric, поэтому решил измениться), и я включил использование привязок HTTP и Net.TCP.
Конфигурация каждой службы выглядит следующим образом:
<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>
Я прочитал в этом посте, что я должен разрешить свою конечную точку netTcp без адреса при размещении в IIS. На данный момент мой 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:
Where is the 808 port ?