Question

Is it possible to have two different versions of the .net framework on the web server then have one Virtual directory use the 2.0 version and another virtual directory use the 4.0 version in the ASP.Net tab in IIS?

A customer has all of it's ASP.Net apps compiled in the 2.0 frame work. But they want to install a newer ASP.Net app in a different virtual directory. And this new app was created in the 4.0 frame work.

How can they configure this on IIS?

Was it helpful?

Solution

Yes it is possible to have multiple versions of .NET installed on a web server.

You can run multiple applications in IIS on different frameworks.

However an application can only use ONE framework. As a virtual directory is part of the application it runs under the application's framework. E.g. Application (.NET 2.0), it's Virtual Directories are CHILDREN of it, so they are running under .NET 2.0.

Further details on IIS, Applications and Virtual Directories

The solution would be to run 2 applications, one for 2.0 and one for 4.0.

Luckily, in IIS, there is a method to convert a Virtual Directory into a Virtual Application, which gives you the opportunity to use a different Application Pool, and therefore different framework version.

I'm going to recommend you read this StackOverflow post, that is far more eloquent then mine.

StackOverFlow - difference between application and virtual directory

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top