サーバー上の 2 つのプロセス間 (同じボックス上) で net.pipe バインディングを構成しようとしています。これはすべて Windows 7 でローカルに機能していますが、運用サーバー (Windows Server 2008 R2) では機能しません。
私が持っていることを確認できます:
- IIS「Web サイト」への net.pipe バインディングを追加しました (情報として * を追加)。
- IIS "Web サイト" の "詳細設定" のバインディングのリストに net.pipe を追加しました。
私の開発マシンで必要だったのはこれだけです。他に何かしなければならないことはありますか?
私が得るエラーは、単純なコンソールアプリのテストクライアントからのものです:
未処理の例外: System.ServiceModel.EndpointNotFoundException: メッセージを受け入れることができる net.pipe://nameOfService.svc でリッスンしているエンドポイントがありませんでした。これは、多くの場合、アドレスまたは SOAP アクションが正しくないことが原因です。詳細については、InnerException (存在する場合) を参照してください。---> System.IO.PipeException: パイプ エンドポイント 'net.pipe://nameOfService.svc' がローカル マシンで見つかりませんでした。
ここにいくつかの設定があります:
クライアント:
<system.serviceModel>
<bindings>
<netNamedPipeBinding>
<binding name="NetNamedPipeBinding_IWebAppNotifyService">
<security mode="None" />
</binding>
</netNamedPipeBinding>
</bindings>
<client>
<endpoint address="net.pipe://nameOfService.svc"
binding="netNamedPipeBinding" bindingConfiguration="NetNamedPipeBinding_IWebAppNotifyService"
contract="ServiceReference2.IWebAppNotifyService" name="NetNamedPipeBinding_IWebAppNotifyService" />
</client>
</system.serviceModel>
サーバ:
<bindings>
<netNamedPipeBinding>
<binding name="WebAppNotifyServiceBinding" closeTimeout="00:01:00" openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00" transactionFlow="false" transactionProtocol="OleTransactions" hostNameComparisonMode="StrongWildcard" maxBufferPoolSize="524288" maxBufferSize="65536" maxConnections="10" maxReceivedMessageSize="65536">
<readerQuotas maxDepth="2147483647" maxStringContentLength="2147483647" maxArrayLength="2147483647" maxBytesPerRead="2147483647" maxNameTableCharCount="2147483647" />
<security mode="None">
</security>
</binding>
<binding name="ScannerManagerCommandBinding">
<security mode="None" />
</binding>
</netNamedPipeBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="WebAppNotifyServiceBehavior">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="True" />
</behavior>
</serviceBehaviors>
</behaviors>
<services>
<service name="MonitoringApp.Notifier.WebAppNotifyService" behaviorConfiguration="WebAppNotifyServiceBehavior">
<host>
<baseAddresses>
<add baseAddress="net.pipe://nameOfService.svc" />
<add baseAddress="http://nameOfService" />
</baseAddresses>
</host>
<endpoint address="" binding="netNamedPipeBinding" bindingConfiguration="WebAppNotifyServiceBinding" contract="X.Y.IWebAppNotifyService" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" />
</service>
</services>
アップデート:
net.pipe バインドをホストする Web サイトに関連付けられているアプリ プールは、「NetworkService」ユーザーの下で実行されています (それが違いを生む場合)。
これは .NET 4 で実行されていますが、.NET 3.5.1 の Windows 機能で非 HTTP アクティベーションを有効にしました。