我有简单的客户端应用程序(控制台应用程序)和服务器应用程序(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词“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>
任何示例如何更新它? –
据我所知这并不重要。操作系统足够聪明,可以将您的计算机名称映射到本地主机。 –
你的服务器可以监听本地主机,但将你的客户端端点更改为你的机器名称,如,这是为fiddler ...不适用于系统 –
GCamel