2013-05-03 55 views
4

WCF请求,这里是我的客户端WCF配置文件:发送通过访问代理服务器

<configuration> 

    <system.net> 
    <defaultProxy 
     enabled="true" 
     useDefaultCredentials="true"> 

     <proxy 
     usesystemdefault="False" 
     bypassonlocal="False" 
     proxyaddress="http://172.20.20.254:8088/" 
     /> 

    </defaultProxy> 
    </system.net> 

<system.serviceModel> 
    <client> 
    <endpoint 
     address="http://172.20.20.100:8080/Demo/text" 
     binding="customBinding" 
     bindingConfiguration="text" 
     contract="DemoService.IDemoService" 
     behaviorConfiguration="largeObjectGraph_behaviorConfig" 
     name="text" /> 
    </client> 

    <!-- Allow To Desrialize Larg Data --> 
    <behaviors> 
    <endpointBehaviors> 
     <behavior name="largeObjectGraph_behaviorConfig"> 
     <dataContractSerializer maxItemsInObjectGraph="2147483646"/> 
     </behavior> 
    </endpointBehaviors> 
    </behaviors> 

    <bindings> 
    <customBinding> 

     <binding name="text" 
       closeTimeout="10675199.02:48:05.4775807" 
       openTimeout="10675199.02:48:05.4775807" 
       receiveTimeout="10675199.02:48:05.4775807" 
       sendTimeout="10675199.02:48:05.4775807"> 

     <CustomMessageEncoder 
       MaxArrayLength="1073741824" 
       MaxBytesPerRead="1073741824" 
       MaxDepth="1073741824" 
       MaxNameTableCharCount="1073741824" 
       MaxStringContentLength="1073741824" /> 

     <httpTransport 
      maxBufferPoolSize="1073741824" 
      maxReceivedMessageSize="1073741824" 
      maxBufferSize="1073741824" /> 

     </binding> 
    </customBinding> 
    </bindings> 

    <extensions> 
    <bindingElementExtensions> 
     <add name="CustomMessageEncoder" type="CustomMessageEncoder.CustomMessageEncodingElement, CustomMessageEncoder, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null" /> 
    </bindingElementExtensions> 
    </extensions> 

    </system.serviceModel> 
</configuration> 

使用的CustomMessageEncoder为了结合进行压缩和加密的邮件。

这里是问题:我们的局域网中有Proxy-Server [172.20.20.254:8088]。

我改变SystemDefaultProxy从ControlPannel它不起作用!

和使用客户端配置文件中的一些选项,像你在这里看到,钢铁不起作用

+0

有有'proxyAddress'和'useDefaultProxy'的属性[绑定配置](http://stackoverflow.com/questions/829301/wcf-custombinding-configuration)。尝试设置为 – Tung 2013-05-03 08:03:06

+0

绑定像基本&WS的intellisense显示属性,但在自定义绑定它剂量显示和baseEncodingElement ** TextMessageEncodingBindingElement ** ** TextMessageEncodingBindingElement.ReaderQuotas **没有该属性:((( – patachi 2013-05-03 08:19:52

回答