Tuesday, January 18, 2011

What would automatically change the .NET framework version of a site in IIS?

The subject says it all, can a reboot or a patch install cause the framework to change from 2.x to 1.x automatically? I have sites that break for no reason from time to time and when we look in IIS the framework version has changed without anyone doing so manually. ???

  • A couple of things I can think of, and none of them related to system funkiness (that is, all are self-inflicted):

    • A developer having an old copy of a project file when deploying an update to the site
    • The IIS metabase getting restored (although I'd think this would cause other panic attacks as well)
    • An app pool serving apps targeting differing frameworks (maybe? reaching on this one)
    Scott Forsyth - MVP : squillman, to answer on your 3rd point, in that situation the site will break if a request is made to an app pool already using a different framework version. It's a race situation. If you recycle the app pool, the first site to load will get its framework version, then all subsequent requests to other frameworks will fail. The sites running the framework version that won the race will continue working. The IIS settings won't change. I agree with the first 2 points.
    squillman : @Scott: Thanks, that's about what I figured but I didn't have something I could test out the theory with.
    From squillman
  • Installing ASP.NET 1.1 with default parameters will set itself as the default framework. (ASP.NET 2.0 doesn't do this. It's more gentlemanly and doesn't change existing IIS sites without you telling it) Additionally if anyone runs aspnet_regiis /i on the server, that will set a particular framework as primary across the board. As squillman said, restoring from a previous backup could also change the framework versions (depending on what it was set at).

    Hotfixes won't change things unexpectantly unless you run into some type of bug. I have seen issues with ASP.NET 3.5 SP1 causing issues on some servers. That has caused reverting back to v1.1. I haven't seen it occur on hotfixes or patches.

0 comments:

Post a Comment