Upgrading to .NET 4 on an IIS site supporting a .NET 2.0 child application
Today I decided to finally make progress on a couple pending applications. As part of that process I needed to upgrade one of my sites to .NET 4. Unfortunately it has a child application that needs to say as .NET 2.0/3.5. After approximately 30 minutes of downtime, I finally got things configured correctly (seemingly). Here's what I ended up having to do.
This assumes IIS 7.5.
- Wrap the system.web and system.webServer elements in the parent Web.config with the following:
<location path="." inheritInChildApplications="false" allowOverride="true"> ... </location>
- If you have the following set in system.webServer, you'll want to move that outside of the location wrapper you added in step 1. Otherwise the site doesn't appear to capture that, and you'll 500.
- Change the application pool settings on the parent application to .NET Framework 4.0 and push the above change.
That was the only change it appears I needed to make. Instead I made a number of minor changes, all over the place, which resulted in the downtime.
In my particular case I also had both the parent and child applications running on the same application pool. I ended up creating a new application pool for the child application, switched it over to that, but neglected to set the identity as NETWORK SERVICE, which resulted in a few moments of questioning. Actually, I correctly set this to the application pool identity, but had actually neglected to give the correct directories the new permissions (since I changed the applicaton pool).
Needless to say, I'll be very happy when I re-write the child application over to .NET 4.
- Review: Dr. Brown's 4 Piece Options Wide Neck Bottle, 9 Ounce
- Review: Philips Sonicare FlexCare Whitening Edition
- Review: Logitech G903 LIGHTSPEED Gaming Mouse with POWERPLAY Wireless Charging Compatibility
- Review: Empires of EVE: A History of the Great Wars of EVE Online
- Review: Ghost in the Shell README: 1995-2017
Support This Site
If my blog was helpful to you, then please consider visiting my Amazon Wishlist.