0

WCF がレポートする場所に問題があります...

net.pipe://192.168.0.100/SystemA/Service1.svc/mexPipe' をアクティブ化できませんでした。

ベースアドレスを次のように定義しました。

サービス 1...

<baseAddresses>
    <add baseAddress="http://192.168.0.100:8050/ProductsService/Service1.svc" />
    <add baseAddress="net.tcp://192.168.0.100:8051/ProductsService/Service1.svc" />
    <add baseAddress="net.pipe://192.168.0.100/ProductsService/Service1.svc" />
</baseAddresses>

サービス 2...

<baseAddresses>
    <add baseAddress="http://192.168.0.100:8050/ProductsService/Service2.svc" />
    <add baseAddress="net.tcp://192.168.0.100:8051/ProductsService/Service2.svc" />
    <add baseAddress="net.pipe://192.168.0.100/ProductsService/Service2.svc" />
</baseAddresses>

サービスごとに、次のように Mex エンドポイントを定義します...

<endpoint address="mexPipe" contract="IMetadataExchange" binding="mexNamedPipeBinding" />

これにより、次のように2倍のmexエンドポイントが確実に得られるはずです...

net.pipe://192.168.0.100/ProductsService/Service1.svc/mexPipe
net.pipe://192.168.0.100/ProductsService/Service2.svc/mexPipe

ただし、この投稿を見ると、これが機能しているとは思いません...

net.tcp バインディング メタデータの問題

投稿者は私と同様の構成をしているように見え、応答者は、ベースアドレスは各スキーム内で「一意」ではないと述べていますが、両方が2つの一意のサービスを参照しているため、確かにそうですか?

WCF は、mex エンドポイントが netNamedPipe であることを検出し、それらのベース アドレスを検索できますか? バインディングが「mexNamedPipeBinding」である場合、またはこれは機能しませんか?

4

1 に答える 1

1

ベース アドレスにサービス ファイル名を含めることは想定されていません。エンドポイント宣言でそれを指定します。

ご覧のとおり、エンドポイントは次のとおりです。

net.pipe://192.168.0.100/ProductsService/Service1.svc/mexPipe net.pipe://192.168.0.100/ProductsService/Service2.svc/mexPipe

サービスファイルにはmexエンドポイント用のフォルダーがないため、これは間違いなく正しくありません。

代わりに、ベース アドレスを次のように定義します。

<baseAddresses>
  <add baseAddress="net.pipe://192.168.0.100/ProductsService" />
</baseAddresses>

エンドポイントは次のとおりです。

<endpoint address="mexPipe" contract="IMetadataExchange" ... />

mex エンドポイントが次のようになることがわかります。

net.pipe://192.168.0.100/ProductsService/mexPipe

これはほぼ正しいように見えます。

于 2011-06-03T13:33:18.027 に答える