jquery – ASMX web service works on localhost but not on production server. Help please! – Education Career Blog

I’ve been working on an intranet project where i’m using asmx web service as the DAL, and consuming them on aspx and htm pages via jQuery.
On my development machine everything runs perfectly. When i deploy the app on production server i can’t access the web service. I tried to access the web service directly via http like so http://productionserver/myproject/DataService.asmx, but that also didn’t help, nothing worked.

I’m using .net 3.5. Ohter apps on the server are working fine.

Please help.

,

It sounds like the server isn’t configured correctly… do you get anything when you visit the asmx page? It is hard to diagnose without more… the most common problems are:

  • app root not set as an application (cog icon) in IIS
  • not using the correct version of ASP.NET (again configured in IIS)
  • app-pool identity not having access either to the code files or the database/whatever (usually causes a “500” error), or not able to run as a service, or not in the IIS_WPG group

Things like load balancers and firewalls can also add complexity, but this isn’t usually the biggest problem.

Finally – for use with jQuery, you might also consider (for the next project) returning JSON from an ASP.NET MVC route – it will make things a lot simpler than using asmx.

,

When you access the URL directly what is the result?
Exactly what happens?

Does your webpage and webservice run on the same server?

I would look in the eventlog for more clues, and after that start putting in debug statements which write out information somewhere.
(Normally the eventlog.)

Leave a Comment