C# 如何配置客户端以捕获Fiddler中的本地WCF请求?
我有一个使用WCF的简单客户端应用程序控制台应用程序和服务器应用程序WCF库项目。我想看看在Fiddler中WCF消息是什么样子的 我在客户端的app.config中添加了以下代码:C# 如何配置客户端以捕获Fiddler中的本地WCF请求?,c#,wcf,fiddler,C#,Wcf,Fiddler,我有一个使用WCF的简单客户端应用程序控制台应用程序和服务器应用程序WCF库项目。我想看看在Fiddler中WCF消息是什么样子的 我在客户端的app.config中添加了以下代码: <configuration> <system.net> <defaultProxy> <proxy bypassonlocal="False" usesystemdefault="True" proxyaddress="http://127
<configuration>
<system.net>
<defaultProxy>
<proxy bypassonlocal="False" usesystemdefault="True" proxyaddress="http://127.0.0.1:8888" />
</defaultProxy>
</system.net>
My Fiddler显示来自浏览器的所有连接,但url中有单词vshub的连接除外,但显示的WCF客户端/服务器应用之间没有连接。如何配置它
更新1:
我的WCF service library服务器应用程序按以下方式配置:
<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无法捕获本地请求。Fiddler只捕获实际通过网络传输的请求。本地请求由Windows进行简化
虽然我不知道这个列表有多实际,但还有一些替代方案。您在客户端配置中无事可做,可以删除代理设置。如果您不使用localhost并用MyMachineName替换它,Fiddler将起作用。据我所知,这无关紧要。操作系统足够智能,可以将您的计算机名映射到本地主机。您的服务器可以在本地主机上侦听,但可以将您的客户端终结点更改为您的machinename,就像这样,这是为fiddler提供的…不适用于SystemDefense,但客户端配置不完整,或者?你能加上它吗