tags:

views:

208

answers:

1

I use JavaScript to post an Asynchronous Request to a Web Service. This works about 95% of the time. Sometimes, the request fails to be processed.

Below is the error message in the Trace file of IIS:

2009-02-24 06:14:40 W3SVC861612620 10.248.24.20 POST /TestWebService /TestWebService.asmx - 3112 - 10.250.201.45 Mozilla/4.0+ (compatible;+MSIE+6.0;+MS+Web+Services+Client+Protocol+1.1.4322.2032) 500 0 0 1148 954 124876

This shows that the internal Error 500 has occurred to the request. Is there any way that I can get to know this in the JavaScript where i have posted the request from? Any workarounds are also fine.

+1  A: 

Since you don't provide information about your javascript library, this will be hard to troubleshoot. However, if you're running on IIS 7, you can enable Failed Request Tracing.

Troubleshooting the old school way: your web method is generating an error 5% of the time, meaning it works in certain cases but fails in others. This is likely caused by the parameters sent to your web method. Even if you're unable to trap any runtime requests to your webmethod, you can inspect your logic to see what parameter conditions would cause a failure. Better yet, build a battery of unit tests to call your web method, passing every possible combination of parameters that is feasible.

jro