2012-01-22 4 views
0

私は5つのWCFサービスを持つVisual Studioソリューションを持っています。それらはすべて同じプロジェクト "MyCompany.MySoftware.Services"にあります。IIS 7.5を使用する同じアプリケーションで複数のサービスをホストする

今回私はIISでホストしています(私はWindowsサービスを使用してホストしていましたが、AppFabricを使用して変更することにしています)、HTTPとNet.TCPバインディングを使用できるようにしました。すべてのサービスの

構成は以下の通りである:私はIISでホストする場合のアドレスせずに私のNETTCPエンドポイントをさせる必要があり、この記事で読ん

<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は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
  1. このアーキテクチャは、あなたの問題
  2. TCPが使用するポートは、IISでサイトレベル(結合部位)に設定されているので、サービスしまう原因となりますの構成に固有のものは何もありません
  3. 結構です別のポートを使用するには別のサイトにある必要があります。ポートと残りのアドレスは要求をルーティングするためにそこにありますので、異なるポートにあるサービスに固有の利点はありません。
  4. 3サイトは同じポートを使用します
  5. クライアントのニーズアドレスを完全修飾するにはIISの設定と.svcファイルからサービスアドレス(ポートを含む)の定義をホストするIISで推測されます
+0

したがって、唯一のポートですべての要求を処理できますか?並行処理はどうですか?同時に実行される2つの要求は並行して処理されるか、一方は他方を待つでしょうか? – Catinodeh

+0

それはあなたのサービスのインスタンス化と並行性の設定に依存します(私はここでこれについてブログしています。http://www.dotnetconsult.co.uk/weblog2/PermaLink,guid,1efac821-2b89-47bb-9d27-48f0d6347914.aspx)。確かに要求を並行して処理できない根本的な理由はありません –

関連する問題