Running the ASP.NET Windows Live Web site in IIS7, Could not load file or assembly 'System.Web.Extensions, Version=3.6.0.0,” Error

When I was trying to run the Windows Live Enabled Website that is shipped with the Windows Live Tools for Visual Studio November 2008 CTP (I had blogged about this earlier at https://geekswithblogs.net/ranganh/archive/2008/12/01/windows-live-tools-for-visual-studio-2008.aspx and you can download the CTP from http://dev.live.com ) against IIS 7, I got the error “Could not load file or assembly ‘System.Web.Extensions, Version=3.6.0.0….” error. 

Interestingly this error wasn’t showing up if I create the website in the File Folder that doesn’t use the IIS 7 hosting service.  I had earlier chosen “File – New Website – ASP.NET Windows Live Website” and selected the location as “HTTP” and created the site.  When I was trying to debug, I ran into this issue.  Similarly, when I created a regular ASP.NET Website and tried to add the Windows Live Controls from the ToolBox, I didn’t face this issue.

Apparently, the versioning of the DLLs under the system.webserver setting in the web.config file that was created using my initial approach was referring to the 3.6.0.0 version of the System.Web.Extensions DLL.  This was the preview version that used to be shipped in the earlier days of the ASP.NET 3.5 Extensions Preview.

However, the newer previous that are part of http://codeplex.net/aspnet are back referencing the 3.5.0.0 version.

And this issue must have been coming specifically when running against IIS since the version of ASP.NET mapped to my IIS7 script mappings doesn’t have this version of the DLL and also because of the fact that it was looking into the <system.webserver> setting of the web.config file and trying to locate this version. (the system.webserver is interpreted only when running your site against IIS 7, when you run this using the built-in webserver, this section seems to be ignored)

The solution was simple, I renamed the 3.6 versions back to 3.5 and the site started working.  Guess the website template shipped by the Windows Live Team is referring to the old pattern of the extensions preview reference.

Would update this post, if I find a more appropriate solution/fix or corrections.

Cheers!!!

This article is part of the GWB Archives. Original Author: Harish Ranganathan

New on Geeks with Blogs

  • We Won The One Award I Actually Care About

    Full Scale made the Inc. 5000 for the fifth year straight, the 12th listing across my three companies. Here is why the one award you cannot buy is worth stopping for.

  • Your Customers Build the Features Now

    I let a tool I liked sit dead for a year rather than build the features I wanted. An MCP server meant I never had to, and your customers can do the same to your product.

  • Get the Size of a Directory in Linux the Easy Way

    du -sh for the quick answer, ncdu for the cleanup, df for the disk itself: every command for checking directory size in Linux, plus why du and df never agree.

  • Vim Search and Replace: The Ultimate Guide

    One :%s command replaces every match in a file before a find dialog would even open. The Vim substitute patterns worth the muscle memory: flags, ranges, capture groups, and multi-file edits.