WCF服务停止发送Web请求,一旦它在IIS

问题描述:

的托管我有一个从Silverlight客户端接收查询和查询发送到搜索API(冰或谷歌)WCF服务,处理搜索结果返回的回Silverlight客户端。WCF服务停止发送Web请求,一旦它在IIS

在Visual Studio中找到所有的东西。

一旦我在IIS中发布服务,我就可以访问服务端点和silverlight客户端以与服务通信。但是,该服务不会向搜索API发送任何查询。我打开了Fiddler来监视流量。没有网络请求发送到搜索API。

在我忽略的IIS或防火墙中是否有任何设置?

的Web.config下面附:

<?xml version="1.0" encoding="utf-8" ?> 
<configuration> 
<system.serviceModel> 
    <behaviors> 
     <serviceBehaviors> 
      <behavior name="SiteRankerBehavior"> 
       <serviceMetadata httpGetEnabled="true" /> 
       <serviceDebug includeExceptionDetailInFaults="true" />     
      </behavior>    
     </serviceBehaviors> 
    </behaviors> 
    <services> 
     <service behaviorConfiguration="SiteRankerBehavior" name="SiteDiscovery.SiteRanker"> 
      <endpoint address="" binding="basicHttpBinding" contract="SiteDiscovery.ISiteRanker">     
      </endpoint> 
      <endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange" /> 
     </service> 
    </services> 
</system.serviceModel> 


感谢 萨拉

+0

能在IIS上看到你的配置文件吗? – DDiVita 2010-03-11 03:44:05

好吧,我找到了解决办法here恰好解决了我的问题。基本上,我需要将以下内容添加到web.config并且一切正常。

<system.net> 
    <defaultProxy> 
     <proxy usessystemdefault="False" proxyaddress="http://your-proxy-name.domain.com:port-number-if-any" bypassonlocal="True" autoDetect="False" /> 
    </defaultProxy> 
</system.net> 

为什么它在Visual Studio中工作对我来说仍然是一个谜。严格来说,如果Fiddler同时运行,它在Visual Studio中就可以工作了。