简体   繁体   中英

webservice returns HTTP error 500 after deployment

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",   
           dataType: "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:

  1. Copy 1 DLL to bin/;
  2. Add a few definitions to your Web.config.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM