RepeatHost Business Hosting

iis

Fixing Relative Paths in C# ASP.NET When Using Url Rewriting

UPDATE: This method is generally used in situations where you have relative paths in your project so that links (image, href, css, etc) work on your development environment (where the VS web server inserts a virtual path), as well as your production environment that may or may not have that same virtual path.  The simpler way to handle this situation is to change the virtual path in your development environment.  To do this, click on your web site project and look in the properties dialog.  You should see a Virtual Path setting.

Change IIS ASP.NET Framework Version Programatically

I searched a good deal for a simple and easy way to change the target ASP.NET framework version for a Virtual Directory in IIS. To manually do this, you would normally open IIS and right-click the Virtual Directory you wanted to configure settings for. Then select Properties and you would be presented with a dialog like this:

iis asp.net tab

To configure this setting programatically, you can use the application:

aspnet_regiis.exe