502 bad gateway

  • Thread starter David Perez Essenwanger
  • Start date
D

David Perez Essenwanger

Hi,

I created a c# windows application and I am using a web service calling
the Main(string[] args) methos

I can create the web service object, but when i try to call the mothed I
get this error message:

The request failed with HTTP status 502: Bad Gateway. at
System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapCl
ientMessage message, WebResponse response, Stream responseStream,
Boolean asyncCall) at
System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String
methodName, Object[] parameters) at
uploadTest.com.facilityassociation.uat.UploadService.UploadFileWebServic
e(String loginName, String password, String province, Byte[]
fileContent) in C:\net\uploadtest\uploadTest\Web
References\com.facilityassociation.uat\Reference.cs:line 37
at uploadTest.uploadTest.Main(String[] args) in
c:\net\uploadtest\uploadtest\form1.cs:line 74

tthis is the code where it fails:

UploadService srv = new UploadService();
fs = new FileStream(tempPath, FileMode.Open, FileAccess.Read);
byte[] b = new byte[fs.Length - 1];
fs.Read(b,0,System.Convert.ToInt32(fs.Length - 1));
int rc = srv.UploadFileWebService("usrname","password","AB",b);

where b is a text file byte[]

if you can provide with any suggestions, this would be appreciated very
much.

Thanks in advance
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top