Installing ASP.NET 2.0 Application -ensure that it runs ASP.Net 2.0

For my Web Setup (created by MS Visual Studio Setup Project)  I wanted to ensure that a new web application runs ASP.Net 2.0.

Pointed by this thread, I downloaded  "IIS Chameleon".

I've changed the assembly toDLL, excluded Non GUI classes, made ASPNetVersion,INETMGRHelper and CURRENT_RUNTIME_VERSION public and also changed definitions.xml to be embedded resource(may be not a good idea, because it will not allow to customize, but easier to distribute).

I also changed GetAllASPNETVersions to read from ResourceStream.

            Assembly asm = Assembly.GetExecutingAssembly();
            Stream stream1 = StreamHelper.GetManifestResourceStream(APP_DEFINITIONS_FILENAME,asm );//definitions.xml
            document.Load(stream1);//APP_DEFINITIONS_FILENAME);
 

Now my installer custom action calls the function

   Sub EnsureIISAppVer2(ByVal VDir As String, ByVal Site As String, ByVal Port As String)

        ' map IISSite to Site

        Trace.WriteLine("EnsureIISAppVer2 VDir " & VDir & " Site " & Site & " Port " & Port)

        Dim oVdir As New IISChameleon.IISVirtualDir()

        oVdir.MetabasePath = Site & "/root/" & VDir 'Site has format @"/LM/W3SVC/1";

        oVdir.ASPNetVersion = IISChameleon.INETMGRHelper.CURRENT_RUNTIME_VERSION

        Dim helper As New IISChameleon.INETMGRHelper()

        helper.DoAspnetRegistration(oVdir)

     End Sub

 

 

posted @ Thursday, April 27, 2006 1:09 PM

Print

Comments on this entry:

No comments posted yet.

Your comment:



 (will not be displayed)


 
 
 
 
 

Live Comment Preview:

 
«November»
SunMonTueWedThuFriSat
25262728293031
1234567
891011121314
15161718192021
22232425262728
293012345