PDA

View Full Version : Configuring ASP.NET 1.1 app on system with .NET 2.0



marc.gibian
04-11-2006, 11:47 AM
I have a Basic MSI project that installs a product that depends on the .NET framework version 1.1, which includes an ASP.NET application. It was inevitable that we eventually bump into .NET 2.0, which happened this week. Apparently the ASP.NET application fails when run on .NET 2.0, so I need to enhance the installer to configure IIS to use .NET 1.1 for this application. I am looking at the MSDN documentation on ASP.NET Side-by-Side Support, and the Aspnet_regiis.exe tool specifically.

I was wondering what others are doing to address this issue before I commit to a specific implementation? I am open to migrating to InstallShield 11.5 if that makes things simpler.

nathandragon
05-18-2006, 12:46 PM
Hey Mark-

We have an application that has migrated from ASP.NET 1.1 to ASP.NET 2.0. So I have had do deal with similar issues.

As I understand it, you can operate IIS in either ASP.NET 2.0 or 1.1 but not in any kind of mixed mode. I believe you will be able to run them together in IIS 7, but I'm not holding my breath.

Most likely, you will need to run aspnet_regiis from the .NET 1.1 directory when your installer runs to ensure that ASP.NET is set to the proper version.

You can also check for the existence of the ASP.NET 2.0 filters using a script such as:

Function CheckASPNET()
On Error Resume Next
Set objIISFilter = GetObject("IIS://localhost/W3SVC/Filters/ASP.NET_2.0.50727.42")
if IsObject(objIISFilter) Then
Session.Property("ASPNET_INSTALLED") = "True"
else
Session.Property("ASPNET_INSTALLED") = "False"
End If

End Function

HOWEVER, just because this filter is installed doesn't mean that IIS is set to ASP.NET 2.0. You will still need to run aspnet_regiis or modify the IIS metabase to change the configuration.

Hope this helps.

-Nathan

marc.gibian
05-18-2006, 01:28 PM
Hi Nathan,

Thus far, we are going with just instructing our users on how to use aspnet_regiis to set ASP.NET 1.1 for our application. This is good enough for now, though in the future we may have to go with incorporating this into the installer.

Ideally, our product will support ASP.NET 2.0 since its supposed to be backward compatible, but... I'm not counting on that.

Finally, while you can run 1.1 and 2.0 "side-by-side", there are two ASP.NET entities that run a single instance on a given platform. These will run with the latest version of ASP.NET installed on a system, and they may not be backward compatible with code expecting the older version. Thus, you need to be particularly attentive to use of the ASP.NET Context Service and the ASP.NET SQL Context Server (I think I got these names right). Our application happens to use the first of these, and is not compatible with the 2.0 version of the service. On the other hand, we only need a single instance of the 1.1 service anywhere in the customer's network.

Hope this helps you.