Click here to Skip to main content
15,897,891 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

My wcf service needs to send some files to another wcf service which present over the internet. My WCF service is hosted in a windows service on a computer in my organization's domain. All the communications to the outside world happen through a Proxy Server. I tried turning on the impersonation in the host Windows Service and then gave valid credentials to the 'Log on as' property of the service. It is working fine. But, apparently, this is not to be done.

Is there anything, that I can set the proxy server details and send the valid credentials to the proxy server before sending files through my WCF service code to another WCF service over the internet?
Posted

1 solution

For Bypassing proxy servers you need to add the following property
HTML
bypassProxyOnLocal="true"
in BasicHttpBinding tag from web.config file of your wcf application.

Sample code,

HTML
<binding name="higherMessageSize_BASIC" closetimeout="00:30:00" opentimeout="00:30:00" receivetimeout="00:30:00" sendtimeout="00:30:00" bypassproxyonlocal="true" hostnamecomparisonmode="StrongWildcard" maxbufferpoolsize="524288000" maxreceivedmessagesize="65536000" messageencoding="Text" textencoding="utf-8" usedefaultwebproxy="true" allowcookies="false"></binding>


Thanks & Regards,
BlueSathish
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900