views:

48

answers:

1

When calling an asp.net web service from a windows mobile device project, I am catching an exception ( WebException ) and the response inside that seems to be "BadRequest".

This is occurring on a live system but not locally in development. But they both have the same build....

When we point our development code at the live web service we get the BadRequest error again. Is there any way I can get more information about this error?

We use Elmah for logging and can confirm no exceptions are being thrown in the web service itself, in fact, it isn't even getting invoked!

+1  A: 

Bad Request is a generic error which means the server didn't even bother looking much at the request from the client because it was significantly malformed in some way (service receive buffer lengths exceeded, etc.).

Try to send the server something simpler from the client until it works and/or gives a different (more precise) error.

Unfortunately, server exception handling or viewing traffic on the wire with a tool like Fiddler is probably not going to be helpful in this scenario.

It would help to know which version of web services this is (ASP.NET 2.0, WCF, etc.).

Michael Maddox
Fiddler could well be very useful, because you can capture the working request from one machine and easily compare it to the non-working request from the other machine.
EricLaw -MSFT-
My reading of the question implies that no client is successfully communicating with the live server. If one client is successful where another is not, and it's possible that the clients are sending different data to the server, then I would agree that Fiddler could be useful.
Michael Maddox