c# - Sending WCF requests through ProxyServer -
here client side wcf config file :
<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 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>
using custommessageencoder binding in order compress , encrypt messages.
here problem : have proxy-server[172.20.20.254:8088] in our lan.
i changed systemdefaultproxy controlpannel doesn't work !
and use option in client config file u see here , steel doesn't work
here source : http://blogs.infosupport.com/configuring-a-proxy-server-for-wcf/
<custombinding> <binding name="mycustomclientbinding"> <binarymessageencoding /> <httptransport proxyaddress="http://gateway:8080" usedefaultwebproxy="false" /> </binding> </custombinding>
Comments
Post a Comment