I have inherited a .NET Framework 1.1 web site that I must host with IIS 7 on Windows Server 2008. I'm having some trouble.
I installed .NET Framework 1.1 following these instructions.
The installation automatically created a new Application Pool "ASP.NET 1.1". I use that.
When I launch the web site I see web.config runtime errors:
The tag contains an invalid value for the 'culture' attribute.
I fix that one and then see:
Child nodes are not allowed.
I don't want to keep playing this whack-a-mole game. Something must be wrong.
I examine the automatically created application pool. I see that it's 1.1.
Advanced Settings...
Basic Settings...
This doesn't seem right.
While 1.1 is set, it's not an option in the Advanced drop down selectors.
And why in the Basic box is it just "v1.1" and not ".NET Framework v1.1.4322"? That would be more consistent.
I cannot select .NET Framework 1.1 for other application pools. It's not an option in the drop down selectors. What's up with that?
A quick-fire way to find out if the application is running under 1.1 is to knock up a quicky script that displays the environment version:
<%@ Page Language="C#" %>
<script runat="server">
void Page_Load(Object sender, EventArgs e)
{
Response.Write(System.Environment.Version.ToString());
}
</script>
Or if you're getting yellow screens of death then you'll see the version number at the bottom of the page:
I suspect the reason you can't select Framework v1.1 when adding a new application pool or modifying an existing one is that the 1.1 installer doesn't know how to add some critical piece of metadata or config info to IIS.
.NET 2.0 ships with 2008 and .NET 4.0 being a later product is IIS7 friendly as well so there is most likely better IIS integration. Or, v1.1 doesn't have some essential nugget of metadata that IIS7's InetMgr needs to be able to add this to its various lists.
The reason you can see v1.1 in the drop downlist for the ASP.NET 1.1 pool Basic Settings dialogue and not the other pools is because it's already been set and so will just be included in the list. I experimented and changed this on the newly created ASP.NET 1.1 pool and set it to 2.0, saved, then re-opened. The result is that v1.1 isn't visible any more.
Additionally the reason it's called v1.1 and not .NET Framework v1.1.4322 is because the value is being picked up from the managedRuntimeVersion
attribute in the app pool config in applicationHost.config
. The reason that versions 2.0 and 4.0 show a full description is that there's probably some piece of IIS friendly metadata with a resource string being looked up that isn't present for 1.1.
To set a pool to use v1.1 at creation time you have to manually set the managedRuntimeVersion
attribute using APPCMD.EXE
:
appcmd add apppool /name:"NewPool" /managedRuntimeVersion:"v1.1"
This is explained at the bottom of the article you linked to.
To change an existing pool to use 1.1 you must also use the command line APPCMD.EXE
tool:
appcmd set apppool /apppool.name:"SomeOtherPool" /managedRuntimeVersion:"v1.1"
Interestingly you can set managedRuntimeVersion
to any old value:
I wish I could explain away why the ASP.NET 1.1 application pool magically gets created or how the installer manages to do the right thing with the handler mappings (somehow all the correct preConditions
are set, so either the installer has been updated or IIS has some kind of trigger to look for 1.1 being installed and fix up things).
Update:
I contacted Bill Staples, the author of this article:
How to install ASP.NET 1.1 with IIS7 on Vista and Windows 2008
I asked him about how the 1.1 installer or IIS7 manage to do the right thing regarding handler mappings, creating the "ASP.NET 1.1" application pool and so on. This was his reply:
"If memory serves, in Vista/Windows 2008 there was an application compatibility shim created which would detect the 1.1 installer and do the app Pool creation/handler mapping. However, in Windows 7 / Windows Server 2008 R2, .NET framework 1.1 is no longer supported and I wouldn't be surprised if this code was pulled, though I don't know for sure."
So mystery solved.