Our home grown work tracking system has been through many versions over the years. The current incarnation was using a pre-release version of the Microsoft AJAX extensions. Now this caused a problem when we moved the ASP.NET application to a newly rebuilt IIS server with the 1.0 release version of AJAX.

We were getting errors that the correct System.Web.Extensions DLL could not be found, as you would expect. I rebuilt the application using Visual Studio 2005 with the AJAX 1.0 Release installed, and published this build. I tried to load the application and the browser went into a tight loop, not what I expected. I checked the server event log and found the issue was that in the published web.config file there was a reference to a Crystal Reports DLL (which we have not used for years). Once I removed this reference from the web.confg the site worked perfectly.

So the tip: look out of old long forgotten assembly declaration in ASP.NET applications, if you change a technology (as we did from Crystal Reports to Microsoft Reporting Services) make sure you removed the references, even if the old DLLs are on your servers. They will tend to bite you on an upgrade.

Addendum (written a couple of days later)

On reading this might have thought ‘he is not using a very good code release model’, but I actually have been using the Visual Studio Publish tool. I publish to a local directory then upload these files via FTP to the remote hosting site, replacing all files on a software publish. So in theory if I have removed a reference to an old DLL in Visual Studio then it should also be removed in the re-published site.

Now this appears not to be the case, I can find no reference to Crystal Reports in my solution, but on each publish it reappears. How strange, I will post again if I find out why.

Addendum 2

Found it, a bit of a user too stupid error really! The problem was not a stray reference but an extra entry. This goes some way to explaining why we did not get a could not load assembly error. As during the page we could not loaded the correct httpHandler it tried to go to the error page, which in turn could not load the handler etc. etc. etc.

Again it shows you cannot always trust an IDE to clean up a project files if you change technology.