2017-03-16 5 views
0

私は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> 

答えて

0

ローカル要求はフィドラーでcatchedされていません。 Fiddlerは、実際にワイヤを通過する要求を捕捉するだけです。ローカル要求はWindowsによって短縮されます。

いくつかの選択肢がありますが、実際のリストの実際の状態はわかりませんが、an old postがあります。

0

クライアントの設定で何もしていないので、プロキシ設定を削除できます。あなたが "localhost"を使用せず "MyMachineName"に置き換えた場合、Fiddlerは動作します

+0

どのように更新するのですか? –

+0

私が知る限り、それは問題ではありません。 OSはあなたのマシン名をlocalhostにマップするのに十分スマートです。 –

+0

あなたのサーバはlocalhostでリッスンできますが、クライアントエンドポイントをのようなmachinenameに変更することができます。 – GCamel

関連する問題