Installing .NET 3.5 on a server with .NET 2.0 applications - asp.net-2.0

I would like to upgrade my web projects on an IIS 5 server from .NET 2.0 to .NET 3.5. These web applications live on a server with other web applications that will not be upgraded to .NET 3.5. The server administrator is reluctant to install .NET 3.5 because he is afraid it will break the applications on that machine that are running 2.0 and 1.1.
As far as I know this WON'T be a problem since .NET 3.5 is an addition to 2.0 more than it is a new Framework. I would like the communities help gathering evidence to show him that their concerns are moot and it won't hurt the other applications.
Thanks in advance.

If you have .NET 2 SP1 you shouldn't have a problem.
To be exact .NET 3 & 3.5 are built on top of .NET 2.0 SP 1, we had a problem deploying 3.5 onto a server which only had .NET 2 (not SP1) and it caused the apps on there to break. The reason is your core framework assemblies in .NET 2 are upgraded and have new version numbers which the app wasn't compiled against.

It won't have any problem and you will be able to run your 2.0 and 3.5 application using the same server. This is because the code base for both of the frameworks is the same.

Walk the server administrator through the content of the redistributable for 3.5. It adds a lot of new dlls it doesn't update anything in the 2.0.x directory. You might want to show him how the apps targeting 3.5 are still using System.dll etc from the 2.0.x framework directory.

Both frameworks can run concurrently. In fact, that is the default behavior.
One caveat though, make sure that you don't use the same application pool for apps using different versions of the framework. Otherwise you will get "Server Application Unavailable" errors. Use a different app pool for each set of applications.

Installing 3.5 will modify your .NET 2.0 web.config file and a few others.
This certainly breaks at least 1 application I use. Uninstalling 3.5 will revert the files and fixes the issue.

I've upgraded a couple servers from .net 1.1 to 2.0 & 3.5ץ there haven't been any problems.

Related

Can .NET 6 (Core) coexist on the same server with .NET 4.8 Framework?

Can .NET 6 coexist on the same server with .NET 4.8 Framework? We have a .NET 3.1 application we want to update to .NET 6 but the same server also runs an application running on .NET Framework 4.8. However we can't update this application at this time. We don't want to install .NET 6 if we are going to blow up the .NET 4.8.
The closest answer I have found is this SO post, but it isn't definitive and .NET 6 is a different animal than .NET 5.
Absolutely, on my production server I am still running the main domain as .NET Framework 4.8, while I have created new subdomains running ASP.NET 6.
So just go ahead (of course you should still test locally, that other things don't interfere.
I should say, that I am running both on IIS.
One thing you should be aware of: If you want to run asp.net 6 in IIS 'inprocess' mode, then you need to create a new app pool for your new site, it can't share it with .Net Framework 4.8. If you can't do that, you must run in 'outofprocess' mode.
https://learn.microsoft.com/en-us/dotnet/standard/choosing-core-framework-server
According to this document, the answer is no.

Running IIS .NET4 Application under a .NET2 Site

Is it possible to host a .NET 4 application under a .NET 2 site?
For several reasons we have to run the main site on .NET 3.5, but there is an application written in entity framework 4, which hosted under the same domain/port.
When I try to add an application under the site (using a different .net 4.0 application pool), i get an error stating duplicate content in web.config. I have searched the net for fixes, but none of them seems to be working for me.
I am running a Windows Server 2008 R2 with IIS7.5
Any help would be appreciated.
It is possible to fix, if you carefully read Microsoft's document,
http://msdn.microsoft.com/en-us/library/a99txfy5.aspx
and
http://www.asp.net/whitepapers/aspnet4/breaking-changes#0.1__Toc256770150
No, that's not possible. An assembly compiled against .NET 4.0 must be run inside CLR 4.0. It is possible the other way around: run an assembly compiled against .NET 2.0 inside CLR 4.0.
No, the nested application will not be able to set a seperate framework version. I would suggest changing the version on the main site to v4. I don't think you should experience problems running a 3.5 app on version 4. What are your reasons for running it in 3.5?

Updating web server from ASP.NET 1.1/2.0 to 3.5

I'm still fairly new to ASP.NET development so bear with me.
I'm going to start development on an updated version of an ASP.NET 1.1 website, which I will develop in ASP.NET 3.5. Currently, my development server allows me to run web sites on 1.1 and 2.0. I've had the 3.5 framework installed, but is there any other configuring/issues I should know about? This server will need to keep running the ASP.NET 1.1 web site alongside the 3.5 one I will be developing.
Thanks in advance.
EDIT: Although I have .NET 3.5 framework installed, when I go into IIS and create a new Virtual Directory, it only gives me the options of 1.1 or 2.0.
This is what you're looking for:
http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx
You can set each site (indeed, each virtual directory if you want) to use a specific version of the runtime.
You should have no other configuration issues. If the server is set up to run 2.0 sites, you're good to go, since sites written against 3.5 use the 2.0 runtime, plus 3.5 bits if they are available.

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?
.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.
As long as your server is running 3.5, you can run both.
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.
Yes you can without issue.
.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.
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)
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.
You can run them both at the same time as long as .NET 3.5 is installed.
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.

Upgrade to ASP.NET 3.x

I am currently aware that ASP.NET 2.0 is out and about and that there are 3.x versions of the .Net Framework.
Is it possible to upgrade my ASP.NET web server to version 3.x of the .Net Framework?
I have tried this, however, when selecting which version of the .Net framwork to use in IIS (the ASP.NET Tab), only version 1.1 and 2.0 show.
Is there a work around?
if I install 3.5 and have IIS setup to use 2.0. I will be able to use 3.5 features?
Yes, that is correct. You have IIS set to 2.0 for both 2.0 and 3.5 sites, as they both run on the same CLR. 3.5 uses a different compile method than 2.0. This is declared in the web.config for the site. See this post for more details on this. But the setup in IIS for both 3.5 and 2.0 ASP.net sites is identical.
Unfortunately, the statement .NET versions can be installed side-by-side, so it won't disrupt any "legacy" apps isn't entirely true. If you install 3.5, it requires 2.0 SP1, which can disrupt legacy applications that uses 2.0 and connects to Oracle database servers.
Sure, download the 3.5 redistributable, install it on the servre, and you're good to go. .NET versions can be installed side-by-side, so it won't disrupt any "legacy" apps.
http://www.microsoft.com/downloads/details.aspx?FamilyId=333325FD-AE52-4E35-B531-508D977D32A6&displaylang=en
GateKiller,
.NET 3.0 and .NET 3.5 did not change the version of the CLR, so "using ASP.NET 3.5" is a more complicated thing that it sounds like it should be at first. In essence, you're still running on the 2.0 CLR, but you're using the C# 3.0 compiler and linking against the 3.5 libraries. It means adding a bunch of stuff to your Web.config file to become an ASP.NET 3.5 project.
Scott Hanselman has an awesome blog post covering the details:
http://www.hanselman.com/blog/HowToSetAnIISApplicationOrAppPoolToUseASPNET35RatherThan20.aspx
The version you are selecting in IIS is the version of the CLR to use. There are only two versions of the CLR. The .NET Framework 3.5 runs on CLR 2.0
The new framework is .Net 3.5, you'll have a new assembly System.Core, + a few more if you use features like Linq
.Net 3.5 comes with the new C#3.0 compiler
ASP.Net is still version 2.0
Lovely and confusing isn't it ;-)
You should upgrade the .Net framework on the server to .Net 3.5 SP1, but you're still going to be running ASP.Net 2.0

Resources