[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 683
  • Last Modified:

programatically setting the ASP.NET version in IIS

hi experts,

I came across approaches in creating virtual directory in IIS (worth mentioning are those using IISVirtualRoot of System.EnterpriseServices.Internal and the others using DirectoryEntry class).

With those I am now able to create virtual directories programmatically.

My problem however is that the IIS where I will be deploying the project supports both .NET 1.1 and 2.0

Is there a way to programmatically select the .NET version that the virtual directory will use?

Would appreciate any help.

Thanks
0
steelheart38
Asked:
steelheart38
2 Solutions
 
existenz2Commented:
Have a look at this url. It's pretty similair from what you want:

http://channel9.msdn.com/ShowPost.aspx?PostID=173213
0
 
devsolnsCommented:
Not like you can with a managed assembly where you can put the requiredRuntime attribute in the app.config file.  I dunno this does seem like a big deployment issue to me. Its a value in a drop down box but maybe deployment is out of your hands...

Im not sure what all the code in the link above was about but if you want to determine the version of any .NET application including asp.net at runtime use,


Environment.Version

It will tell you what version your currently under.  So you can check the version in the application startup.
0
 
steelheart38Author Commented:
Thanks for you help guys

I was able to come across the solution that closest fits my needs. I hope you will understand if I am requesting for reduction of points to be given since I found the solution already yet as you have somehow led me to the solution I will still be giving out points.

http://www.codeproject.com/useritems/iischamaleontool.asp

More power to you two
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now