How To Modify An IIS Virtual Directory "ASP.NET Version"Programmatically?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Crash

    How To Modify An IIS Virtual Directory "ASP.NET Version"Programmatically?


    ..NET Framework 1.x, 2.x, 3.x...
    ASP.NET 5.0, 5.1, 6.0...
    Windows Server 2000, XP, Server 2003...

    I am using NAnt & the NAnt contrib library to automate virtual
    directory maintenance tasks on IIS servers with side-by-side installs
    of ASP.NET.

    I can automate most IIS tasks using NAnt however - to configure the
    ASP.NET version for a newly created virtual directory I must manually
    run inetmgr.exe and set the virtual directory's ASP.NET version from
    the Properties/ASP.NET tab. Questions:

    1) Is this command line the equivalent of setting the ASP.NET version
    from the inetmgr.exe Properties/ASP.NET tab?

    aspnet_regiis -s W3SVC/1/ROOT/<MyVirtualDirec tory>

    2) Is there an ADSI API to set the ASP.NET version - aka how might I
    automate this task from C# & ADSI?

    --Richard
Working...