Why does IIS fail when I reference a .NET 3.5 assembly in ASP.NET?

I added a reference to a .NET 3.5 assembly in one of our ASP.NET web pages. Visual studio warned me that the website project was using .NET 2.0 and needed to be upgraded to use 3.5. So I right clicked on the web project, changed it to use 3.5, and added my reference. All was well with the world…

…That is until I hear the clear “DOH!!!” from my CCTray app, and the dreaded “Red ‘C’” icon, indicating that I just broke the build.  “Doh!!!” indeed!

This perplexed me for a while until I realized that our app does not deploy a web.config file. However, the web.config file contains the setting telling IIS what compiler (2.0, 3.5) to use. Once I realized this, I created a web.config, committed it to svn, and got the familiar “Whoohoo!” sound from CCTray along with the nice “Green ‘C’”. All is once again well with the world!

For more information on this issue, check out:


This entry was posted in ASP.NET, IIS and tagged , , . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>