views:

197

answers:

2

Is there a simple and foolproof way we can test an AJAX installation? We have a problem in calling a webscript using AJAX form a JS file. The error is 'ServiceLib' is not defined. The error gets a few hits on Google.

We've added some AJAX functionality to a customer's app. This works fine here in the office on dev machines and on our IIS Server, it works fine on the customer's test web site, but when we put the app on the live site, the webscript calls fail.

The customer installed AJAX on their live server a few days ago. We've verified that the service lib files are there and in the right places.

We've already spent hours on this with no solution and still do not know for sure whether there is something wrong with our code, or something is wrong on their server, or for that matter, whether AJAX is even correctly installed. Part of our problem is that we have no access to their live server, so there is not much we can do other than change lines in our own code, give the app files to our contact there, and see what happens. The contact knows less than we do, so we are working blind. A strange situation, I know, but there is beaurocracy involved.

Many thanks Mike Thomas

+1  A: 

Firebug might help - if you can get someone at the far end to install it, it may be able to give you an insight into what is going on with the ajax requests via its console, which logs and gives you the ability to view the return data of all ajax requests.

benlumley
A: 

I'm thinking...

There are three parts to the process:
1) The client-side javascript logic in the browser sends the HTTP request to the server.
2) The server-side ASP.NET page processes it and responds.
3) The client-side logic receives the response and updates the web page, or whatever.

Swap out each part with something simpler and diagnostic to see where in the pipeline the break is.

For example, create a diagnostic webpage that's a substitue for #1 that calls the server-side page directly.

If that seems to work, create a different server-side ASP.NET page that's very simple, just logs something, to prove that the real #1 does what your diagnostic #1 did.

Ya know, your standard debugging binary search...

Corey Trager