VS2010 のプロキシ生成に問題があります。
特にWCFとPub/Subパターンを使用してクライアント/サーバーアプリを作成しました。サービスはローカルでうまく動作しますが、サーバー上でサービスを起動し、ブラウザから関連する URL を介してアクセスできますが、以下のエラーが発生せずに「サービス参照の構成」を行うことはできません。
URL http://cfplonbs2:8686/TradePortalのドキュメントは既知のドキュメント タイプとして認識されませんでした。既知の各タイプからのエラー メッセージは、問題の解決に役立つ場合があります。- 「http://cfplonbs2:8686/TradePortal」からのレポートは、「ドキュメント形式が認識されません (コンテンツ タイプは「text/html; charset=UTF-8」です)」です。- 「DISCO ドキュメント」からのレポートは、「'http://localhost:8686/TradePortal?disco' のダウンロード中にエラーが発生しました。」です。- リモート サーバーに接続できません - ターゲット マシンがアクティブに拒否したため、接続できませんでした; charset=UTF-8').'. メタデータに解決できない参照が含まれています: 'http://cfplonbs2:8686/TradePortal'。リッスンしているエンドポイントがありませんでした メッセージを受け入れることができるhttp://cfplonbs2:8686/TradePortal。これは、多くの場合、アドレスまたは SOAP アクションが正しくないことが原因です。詳細については、InnerException (存在する場合) を参照してください。リモート サーバーがエラーを返しました: (404) 見つかりません。サービスが現在のソリューションで定義されている場合は、ソリューションを構築して、サービス参照を再度追加してみてください。
私が混乱しているのは、svcutil.exeツールを使用してプロキシを手動で生成すると、コードが機能するようになることです。このappproachの問題は、VS2010プロキシほどクリーンではなく、iNotifyPropertyChangedインターフェイスを実装していないことです。 .
これは、アクセスをブロックしているサーバーのファイアウォール設定でしょうか? ローカルで生成されたプロキシでバインドしているマシン名を変更するショートカットはありますか?
サーバー側の私の app.config は次のとおりです。
<services>
<service behaviorConfiguration="Default" name="CFP_Web_Lib.TradePortal">
<host>
<baseAddresses>
<add baseAddress="http://localhost:8686/TradePortal"/>
</baseAddresses>
</host>
<endpoint address="" binding="webHttpBinding"
contract="CFP_Web_Lib.ITradePortal"
behaviorConfiguration="web"/>
<endpoint address="Operations/" binding="wsDualHttpBinding"
contract="CFP_Web_Lib.ITradeOperations"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="Default">
<serviceMetadata httpGetEnabled="true"/>
<serviceDebug includeExceptionDetailInFaults="true"/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="web">
<webHttp/>
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<wsDualHttpBinding>
<binding name="WSDualHttpBinding_IPubSubService" closeTimeout="00:01:00"
openTimeout="00:01:00" receiveTimeout="00:10:00" sendTimeout="00:01:00"
bypassProxyOnLocal="false" transactionFlow="false" hostNameComparisonMode="StrongWildcard"
maxBufferPoolSize="524288" maxReceivedMessageSize="65536" messageEncoding="Text"
textEncoding="utf-8" useDefaultWebProxy="true">
<readerQuotas maxDepth="32" maxStringContentLength="8192" maxArrayLength="16384"
maxBytesPerRead="4096" maxNameTableCharCount="16384" />
<reliableSession ordered="true" inactivityTimeout="00:10:00" />
<security mode="Message">
<message clientCredentialType="Windows" negotiateServiceCredential="true"
algorithmSuite="Default" />
</security>
</binding>
</wsDualHttpBinding>
<mexHttpBinding>
<binding name="NewBinding0" />
</mexHttpBinding>
</bindings>
私が間違っているところについて何か考えはありますか?