We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you a podcast all about Citrix Workspace, moving to the cloud, and analytics & intelligence. Episode 2 coming soon!Listen Now

x

programatically setting the ASP.NET version in IIS

steelheart38
steelheart38 asked
on
Medium Priority
698 Views
Last Modified: 2009-12-16
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
Comment
Watch Question

Have a look at this url. It's pretty similair from what you want:

http://channel9.msdn.com/ShowPost.aspx?PostID=173213

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Commented:
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.

Author

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
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.