views:

335

answers:

4

I have a website running on .NET 2.0 right now.

I have a reporting tool which needs to run on the same webserver as well, but it was written in 3.5.

Can I create a Virtual Directory under websites, called "Reports" and have that run against 3.5? So the user can go to http://domain/Reports ?

Let me know if this makes no sense.

A: 

That sounds fine.

Chris Lively
+1  A: 

similar: http://stackoverflow.com/questions/284434/virtual-directories-with-different-net-frameworks

ercu
True, similar -- but this is more about the compatibility of 2.0/3.5 than 1.1/2.0. And the answers are actually different in this case -- 1.1 and 2.0 can't coexist in the same app pool; 2.0 and 3.5 do.
John Rudy
A: 

In IIS versions 6.0 and above you can assign your applications to different application pools where you can specify the correct version of .NET.

Dan
+3  A: 

Absolutely. .NET 3.5 is primarily an added set of libraries over a service-packed version of the existing 2.0 runtime. As long as you've deployed 3.5 completely (and service packed it as well, while we're at it), you should be fine.

While there are new language features galore in the newest version of Visual Studio (eg, C# 3.0), these are artifacts of the compiler. All your 3.5 apps will run, as far as IIS settings are concerned, in the 2.0 virtual directories/applications/app pools.

John Rudy
That is not necessarily correct - .NET 3.5 shipped with a service pack to the 2.0 CLR with enhancements and bug fixes, so the 3.5 libraries expect those to be there. As long as the 2.0 application is running on the most recently updated version of the 2.0 CLR, 3.5 libraries can run.
Rex M
Fair enough -- yes, my statement above does expect that you've deployed the full package with the service pack. (I wasn't aware you'd be able to drop .NET 3.5 on the box any other way ... ) I've update the answer accordingly.
John Rudy
Actually, if .NET 3.5 is on the server, then the service packs for 2.0 are on the server.
John Saunders
John Saunders: Bingo; the assumption I was operating on in the first draft of the answer.
John Rudy