Prototype.js Framework calling ASP.Net Webserices

I’ve recently been stumped by a error I was getting when calling a ASP.Net Webservice from the ProtoType.js JavaScript Framework. The calls all worked great from IE7, Firefox and Opera 9 on my local machine, but failed when testing IE6 on a virtual machine. It turns out that you need to enable the Web Service Protocols your server permits as discribed on this Microsoft Support Page.You can solve the problem by adding the following lines to your web.config file under the system.web section The other issue I found was that the Prototype framework was adding an extra
parameter to all calls. The &_= parameter was added to address a
Safari bug
which had later been resolved with another fix. The
following line is therefore not needed and can be safely removed.

if (parameters.length > 0) parameters += ‘&_=’;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: