Geeks With Blogs

News My Blog has been MOVED to

Michael Freidgeim's OLD Blog My Blog has been MOVED to

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

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()


     End Sub



Posted on Thursday, April 27, 2006 1:09 PM ASP.NET , .Net Framework | Back to top

Comments on this post: Installing ASP.NET 2.0 Application -ensure that it runs ASP.Net 2.0

No comments posted yet.
Your comment:
 (will show your gravatar)

Copyright © Michael Freidgeim | Powered by: