私はWCFを使って簡単なクライアントアプリケーション(コンソールアプリケーション)とサーバーアプリケーション(WCFライブラリプロジェクト)を持っています。私はFiddlerでWCFメッセージがどのように見えるかを見たいと思っています。FiddlerでローカルWCF要求をキャッチするようにクライアントを設定するにはどうすればよいですか?
私は、クライアントのapp.configをに次のコードを追加しました:
<configuration>
<system.net>
<defaultProxy>
<proxy bypassonlocal="False" usesystemdefault="True" proxyaddress="http://127.0.0.1:8888" />
</defaultProxy>
</system.net>
私のフィドラーは、URL内の1つの持つ単語「vshub」を除いて、ブラウザからのすべての接続を示しているが、表示されたWCFクライアント/サーバ・アプリケーション間の接続がありません。それを設定するには?
UPDATE1:
私のWCFサービスライブラリ(サーバアプリケーション)は次のように設定されています。
<system.serviceModel>
<services>
<service name="WcfServer.Service1">
<host>
<baseAddresses>
<add baseAddress = "http://localhost:8733/Design_Time_Addresses/WcfServer/Service1/" />
</baseAddresses>
</host>
<!-- Service Endpoints -->
<!-- Unless fully qualified, address is relative to base address supplied above -->
<endpoint address="" binding="basicHttpBinding" contract="WcfServer.IService1">
<!--
Upon deployment, the following identity element should be removed or replaced to reflect the
identity under which the deployed service runs. If removed, WCF will infer an appropriate identity
automatically.
-->
<identity>
<dns value="localhost"/>
</identity>
</endpoint>
<!-- Metadata Endpoints -->
<!-- The Metadata Exchange endpoint is used by the service to describe itself to clients. -->
<!-- This endpoint does not use a secure binding and should be secured or removed before deployment -->
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior>
<!-- To avoid disclosing metadata information,
set the values below to false before deployment -->
<serviceMetadata httpGetEnabled="True" httpsGetEnabled="True"/>
<!-- To receive exception details in faults for debugging purposes,
set the value below to true. Set to false before deployment
to avoid disclosing exception information -->
<serviceDebug includeExceptionDetailInFaults="False" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
どのように更新するのですか? –
私が知る限り、それは問題ではありません。 OSはあなたのマシン名をlocalhostにマップするのに十分スマートです。 –
あなたのサーバはlocalhostでリッスンできますが、クライアントエンドポイントをのようなmachinenameに変更することができます。 –
GCamel