Microsoft Ajax errors on production server

We updated our ASP.NET 2.0 website to ASP.NET 4.0. Everything was working fine locally and on our demo server. When we pushed it on production servers(web farm) the site started throwing weird errors related to Microsoft AJAX. Some errors were like:

- SCRIPT5022: ASP.NET Ajax client-side framework failed to load.

-  SCRIPT5009: 'Type' is undefined

- SCRIPT5009: 'Sys' is undefined

And many more…The errors were not consistent but they would vary upon each request.

Tried various suggestions found on the internet but couldn’t get it work. We knew it was some settings on the server that were messed up but couldn’t figure out which one.

My manager noticed if the website was accessed through ip address it would work but not via domain name. So the issue was tracked down to Big-IP we use to load balance. So he notified the IT to set the BigIP to make connections sticky. After setting that, it started working fine.

Then after some more thought process, my manager realized while pushing the new version, some how the machineKey settings in the web.config might have been accidentally removed. So IIS 7.5 will generate it randomly and when request from one server was routed to different than the first request, asp.net wasn’t able to serve the correct ScirptResource.axd and/or WebResource.axd.

Hope this helps.

No Comments