c# - Calling web service returns The remote server returned an error: (502) Bad Gateway -


i trying call web service in c# using wsdl proxy, web service requires credentials passed

partsinquiryservicehttpservice client = new partsinquiryservicehttpservice();         client.url = "url";         client.credentials = new networkcredential("user name", "password"); 

in line exception thrown

client.getmultiplepartsinquiry(enquiry); 

unhandled exception of type 'system.net.webexception' occurred in system.dll additional information: remote server returned error: (502) bad gateway

please help

the problem in web.config. proxy tag added , web service request fails because proxy credentials not included. removing proxy section solved problem.


Comments

Popular posts from this blog

java - Suppress Jboss version details from HTTP error response -

gridview - Yii2 DataPorivider $totalSum for a column -

Sass watch command compiles .scss files before full sftp upload -