Previous Next

Thread: Creating Website Programmatically And Setting ASP.NET Version

Last post 08-06-2008 6:43 AM by satya.ambatipudi. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 04-25-2007, 7:02 PM

    • geomar
    • Not Ranked
    • Joined on 10-10-2006, 7:23 PM
    • Posts 1

    Creating Website Programmatically And Setting ASP.NET Version

    Hello,

     I need to be creating a ASP.NET site programatically in IIS.  I have successfully create the site using the System.DirectoryServices namespace and the DirectoryEntry class.  However, I am unable to set the ASP.NET version.  Could someone tell me how to do this programmatically.

    Thanks

  • 04-26-2007, 11:38 PM In reply to

    • thomad
    • Top 25 Contributor
    • Joined on 08-20-2002, 11:28 AM
    • Redmond
    • Posts 387

    Re: Creating Website Programmatically And Setting ASP.NET Version

    I assume you are on IIS5.x or 6.0:

    There is no good programmatic way to do this. The simplest way is to call out to "%windir%\microsoft\framework\v2.0.50727\aspnet_regiis.exe". Have a look at the -s and -sn options.

    In IIS7 the ASP.NET version is set on an ApplicationPool and you simply move applications into different AppPools if you want to run a different ASP.NET version.

    Hope this helps.

     

    Thomas Deml
    Senior Program Manager
    Internet Information Services
    Microsoft Corp.
  • 08-06-2008, 6:43 AM In reply to

    Re: Creating Website Programmatically And Setting ASP.NET Version

     

    hi i am also working with same thing. can u send me the code for creating website in IIS from asp.net?

     

     

    satya
Page 1 of 1 (3 items)
Page view counter