Programmatically Set ASP.NET Version

  • Thread starter Thread starter Kulgan
  • Start date Start date
K

Kulgan

Hi All

I am using DirectoryServices to create a web site in C#. I can set the
web site up perfectly with all the options that I want other than the
ASP.NET version! Sometime it is 1.1, sometimes it is 2.0. I have even
enumerated all the Active Directory properties for all of the Sites
and Virtual Directories on my machine. I can't see a property in there
that defines the ASP.NET version to use.

Does anyone know how to do this? Or does anyone know where IIS stores
the ASP.NET version for a given web site?

Thanks,

Kulgan.
 
Hi, Kulgan.

You'll need to run:

aspnet_regiis.exe -s W3SVC/1/ROOT/yourAppname

for your virtual application, from the appropiate directory:

Drive:\%WINDIR%\Microsoft.NET\Framework\v1.1.4322
or
Drive:\%WINDIR%\Microsoft.NET\Framework\v2.0.50727




Juan T. Llibre, asp.net MVP
asp.net faq : http://asp.net.do/faq/
foros de asp.net, en español : http://asp.net.do/foros/
===================================
 
Back
Top