Fog Creek Software
Discussion Board




Welcome! and rules

Joel on Software

Web Service Http 502 error

I have a little app that maintains a local database (Access) of products. I have also created a web service that allows the application to send the product information to a web server, and save it to the database (SQL Sever).

When I run it locally, with the web server on my local machine, it works fine. I expected that when I deployed the web service on the live web server, it would work just the same, but slower obviously.

The problem is, after 1 or 2 records I get an error in my client app: "The request failed with HTTP Status 502: Server Hangup".

Anyone experienced this problem before?

Ben
Wednesday, December 11, 2002

Haven't seen that myself, but I can think of a couple of things to try -

First, can you hit the Web Service from a browser on the server (or from a copy of the client app on the server)? If that works fine, it'll point to networking issues rather than anything on the server side.

Second, does the app work if you use it locally with a SQL Server/MSDE database? If not, maybe you've got some problems with whatever technology you're using for data access.

Third, it might be worth throwing a copy of .NET WebService Studio (http://www.gotdotnet.com/team/tools/web_svc/default.aspx) on the client and looking at the SOAP traffic when invoking the service by hand to see if that tells you anything.

Mike Gunderloy
Wednesday, December 11, 2002

Thanks for the response Mike.

I think it is a networking issue rather than anything server side, because I had the web service sitting on my local machine with a SQL server and it worked fine, so there shouldn't be any problems with the code. The environment that I was testing on is setup the same as the server, both SQL server 7.

Ben
Wednesday, December 11, 2002

I have found that if I put the thread to sleep for a couple of seconds it runs fine, but obviously takes longer. I would like to be able to do it with pausing the thread, any ideas?

Ben
Wednesday, December 11, 2002

What are operating system are you using as the server? What are operating system are you using as the client? Do you have a code snippets of the relevant bits?

Duncan Smart
Thursday, December 12, 2002

Windows 200 Server on the server, Windows XP or 2000 on the client.

What particular code snippets would you find useful in diagnosing the problem? It looks like the problem is sending the information to the web service, and the code for actually sending the data is just a one line call passing in a class.

Ben
Thursday, December 12, 2002

Ben, show us the relevant client side stuff -- the code that does the sending.

Duncan Smart
Friday, December 13, 2002

*  Recent Topics

*  Fog Creek Home