I have a webservice (ASMX) which I have tested locally using built-in VS web server. It works fine in the Dev environment, and there was no configuration of anything in IIS for this kind of webservice to work.
Today when I deployed my site on the live server, I got a 500 error when the webservice is being called. The website doesn't work, and unfortunately the client did not test this on staging (same server)
Here's the sample call to my service.
$.ajax({
type: "POST",
url: 'http://www.mydomain.com/services/someservice.asmx/MyMethod',
data: "someid=564",
d开发者_如何学JAVAataType: "xml",
success: function(msg){
}
In Firebug, http://www.mydomain.com/services/someservice.asmx/MyMethod returns error 500 internal server
.
I called the service using jQuery AJAX, the live server is Windows Server 2008 Standard.
Could someone point out what the problem might be, more troubleshooting points, and how to remedy this?
I would guess that it's nothing to do with your call to the service, but rather the service itself. Check your logs, if nothing is in there, you can always look at the windows event log, that will at least give you a clue as to what the problem is.
If you use global error handling tool you'll be able to log, browser and receive emails with the full details of each exception.
The tool I've choose is elmah and it's very easy to setup:
- Copy 1 DLL to bin/;
- Add a few definitions to your Web.config.
精彩评论