Jason
Jason

Reputation: 17099

Can I run ASP.NET 2.0 and 3.5 code on the same website?

Can I run ASP.NET 2.0 and 3.5 code on the same website? ...or, do I need to separate them by applications, and/or servers?

Upvotes: 9

Views: 4753

Answers (9)

FlySwat
FlySwat

Reputation: 175733

ASP.NET 3.5 is still running on the .NET 2.0 CLR, if you go into IIS you'll see that you can only pick 2.0 or 1.1

So the answer is, yes...ASP.NET 3.5 is basically just extra assemblies in the GAC.

.NET 3.5 was just modifications to the compilers themselves, and the libraries, not the CLR.

Upvotes: 1

Charles Graham
Charles Graham

Reputation: 24835

I would just convert all of the code to 3.5, and it should work perfectly, if you have 3.5 installed on the box.

Aslo note that VS 2008 does multi targeting, and a lot of the features that are new in 3.5 are actually features of the compiler, not the framework itself. So you can target the 2.0 framework and still get many of the new featres of 3.5.

Upvotes: 0

Herb Caudill
Herb Caudill

Reputation: 50002

As far as IIS is concerned, 3.5 and 2.0 are the same. What you have to be careful about is not mixing 1.1 and 2.0 in the same app pool.

Upvotes: 3

Joseph Daigle
Joseph Daigle

Reputation: 48458

You can run them both at the same time as long as .NET 3.5 is installed.

Upvotes: 0

Johan Buret
Johan Buret

Reputation: 2644

You can run code in .NET 2.0 and .NET 3.5 on the same server, but you must have at least one application pool per framework version. The only thing you have to watch is not to mix a 2.0 app and a 3.5 app in the same pool.

Rationale : only one framework can be loaded for each process and each application spawns its own process(es)

Upvotes: 1

Erikk Ross
Erikk Ross

Reputation: 2183

.NET 3.5 is 2.0 with a few extra libraries. So the answer is yes you can run them on the same web site. In fact you cannot even set a web application to run under 3.5. It just runs under 2.0. You can check the ASP.NET tab in the properties of an IIS site to see that there isn't even an option to run your application under 3.5.

Upvotes: 14

Lloyd
Lloyd

Reputation:

.Net 3.5 is an extenion to the .Net 2.0 framework. After you upgrade to the .Net 3.5 framework you can run applications that use all of the .Net 2.0/3.0 and 3.5 framworks.

Upvotes: 1

James Hall
James Hall

Reputation: 6689

As long as your server is running 3.5, you can run both.

Upvotes: 3

Mitchel Sellers
Mitchel Sellers

Reputation: 63136

Yes you can without issue.

Upvotes: 1

Related Questions