How do I determine whether ASP.NET 3.5 is installed on Windows Server 2008 r2 - asp.net

I hate to ask a question that seems like it should be easy to find the answer to on the web, however I am unable to find a straightforward answer anywhere as to how to check what version of ASP.NET is installed on my Windows Server 2008 r2. Any help with this would be much appreciated. Kind regards, Jon

Read registry key, HKEY_LOCAL_MACHINE\Software\Microsoft\InetStp\Components\ as documented in
https://learn.microsoft.com/en-us/iis/install/installing-iis-7/discover-installed-components
As you use IIS 7, its "ASP.NET" feature matches ASP.NET 3.5 you are looking for. If you want to check ASP.NET 4.x, then this approach won't work.
Generally speaking, the ASP.NET component in IIS wraps over aspnet_regiis command line tool to register ASP.NET bits on IIS (ISAPI and so on). Microsoft designed it this way so it felt more natural. However, it turns out to be a disaster later, as .NET Framework new releases can easily break the design.
For example, on IIS 7 if you use ASP.NET 4.x then you have to manually run aspnet_regiis from .NET Framework 4.x installation folder, as there is not ASP.NET 4.x component on IIS 7.

You can go to
C:\windows\Microsoft.NET\Framework
and check if there is v3.5 folder

Related

Framework upgrade from .net 3.5 to .net 4.8

I'm working with one of my clients wherein they are having a few application still written on .net framework 3.5. Though we still have support for .net 3.5, client wishes to upgrade the framework to 4.8. There are no plans to migrate to core/.net 6 as of now but to upgrade to framework's latest version 4.8.
I'm looking for some pointers to migrate an application from 3.5 to 4.8, what could be the runtime changes/retargeting changes/breaking changes. It would be of great help if someone could give me a roadmap to address the problem - where to start from, what details to look into etc. I searched a lot and could not get any specific pointer for my use case. Please help.
Thanks in advance!
Well, in most cases, you should be able to simple set the project up to say .net 4.8 (or 4x). But, you might as well go all the way.
You WILL however has to download and install .net 4.8 on the web server. So, on your developer computer, you most likly do have .net 4.8. But, don't forget to download + install .net 4.8 on the web server (or if it is a hosted plan, find out what is the level of .net they support).
So, for the most part, you should be able to simple in your project, set it as 4.8, and see if it compiles. You have a VERY good chance it will.
That would be this setting project->"my project name properties"
So, the above for the most part should make things work.
Also, once you done the above, (then re-build all). You want to check web.config, and this setting:
<httpRuntime targetFramework="4.8" maxRequestLength="2000000"/>
As noted, you also have to check/ensure that the web hosted server (if this is not a on-site server) also needs the .net frameworks to be downloaded and installed. Often they already are but you want to check that.
It also possible that you are using a asp.net web site as opposed to a asp.net web site application, and thus the above steps do change somewhat.

.Net 1.1 upgrade to .Net 2 - Does it still use the .Net 1.1 framework

We have recently taken on support of a web application that was written many years ago and targeted v1.1 of the .net framework. It runs on Windows Server 2003/IIS 6 environment.
After looking at the configuration of the site in IIS the target framework is set to 2.0.
Given that extended support for .net 1.1 will cease in October of this year (http://support.microsoft.com/lifecycle/?p1=1249) I am trying to ascertain whether the site will still use any of the .net 1.1 framework assemblies given that the application is built and compiled in Visual Studio 2003.
I am assuming this is the case because although ASP.net 2 is set as the target framework
in IIS (and therefore the aspet_isapi.dll invoked is the .net 2 one etc) the assembly is a .net 1.1 assembly and will therefore still use the 1.1 framework. However, is this assumption actually true?
The website only has another year or so to live before being replaced by a new solution entirely so I would prefer not to upgrade it if possible and run the risks such changes bring with them.
However, we obviously can't run something on an unsupported version of the framework if any element of if that framework is actually being used.
Any thoughts would be appreciated.
Update:
It would seem that .net 1.1 is a core component of WS2k3 so you can't just uninstall it. I could have attempted to remove the ASP.net component but I don't think that would fully uninstall everything and given that the dev environment is shared I can't risk causing any issues right now.
However I have previously set everything up on my local machine (Windows 7/IIS 7), so I changed the application pool to point at .net 2 (it was already running in classic pipeline mode), uninstalled .net frameworks 1 and 1.1 and cleaned up the files left behind afterwards.
The result was that the site ran absolutely fine, which would suggest in an IIS 7 environment at least that I don't need to worry about upgrading given we are running under .net 2 within IIS.
It's not an ideal test as it isn't a mimick of our live environment. I'm going to post a question on MSDN and asp.net to see if any Microsoft folks can add anything more definitive. I will post back here with any updates.
Just because official support will end doesn't mean Microsoft will pull the plug and force an uninstall of .NET 1.1 via Windows Update. It only means that:
if a gaping hole in the framework's security is ever found, they'll not fix it;
There won't be redistributables for the next versions of Windows, and the next version of IIS won't run it.
So the application will still run in a year. If you leave the server alone, the application might run until the machine breaks of old age.
So my suggestion is relax, and focus more on the new solution.
I got the answer to this questions after reading this link (provided as an answer to this question on the ASP.net forums)
http://msdn.microsoft.com/en-us/library/ms994381.aspx
Under "Application Load Mechanisms and Possible Issues" it states:
By default, an application built using the .NET Framework will run using the version of the Framework it was built against if that version is installed on the computer
It then goes on to detail (for .net 1.1 and 2.0 at least) when a particular version of the framework is used.
Essentially, because our server has both 1.1 and 2.0 installed the application will still be using version 1.1. If 1.1 was not installed then it would run by default under 2.0, which explains why the web application still worked after I uninstalled .net 1.0 and 1.1 from my local machine.
Given that the live server is W2K3 and I can't remove .net 1.1, I will be rebuilding my application to target .net 4.0.

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?

How can i find out what version of IIS i need to deploy ASP.NET+VB App?

I just got application written in ASP.NET and VB, can i deploy it on any IIS?
Are there any files in project with that kind of information?
There are no files or magic numbers anywhere that can tell you this. Chances are preety good that it will run on a newer versions of IIS but even then your goign to need to know what functionality it requires. For example is it using WebDav? IIS is preety good at being backwards compatible but forward compability not so good. For example IIS7 introduced new functionality which if the application is using it, would prevent it from running on IIS6.
Do you know what version of .net it requires that is more likely to bite you then anything else?
Any IIS that supports ISAPI, I guess, but IIS 5.1 + is recommended (.NET probably won't run on OS that run IIS4 anyway).
Here is a good MSDN link detailing which IIS version comes with which version of Windows as well as useful links for configuring it.
ASP.NET and IIS Configuration
IIS 6 is the minimum for recent .NET versions (i.e. Windows 2003) because Win2000 is not supported (considering server only here).
The Windows version will tell you the IIS version:
Server 2003: IIS 6
Server 2008: IIS 7
Server 2008 R2: IIS 7.5
Also XP: IIS5.1; Vista: IIS7

Running an asp.net 1.1 app under windows server 2008 64bit

Are there any issues with running an asp.net 1.1 application under windows server 2008 64-bit web edition?
I have never tried it myself, but I did find the following pages that you might find interesting:
This blog has an in depth walk through of configuring ASP.NET 1.1 on Windows Server 2008. The author does not say if it is x86 or x64, so I would just assume its x86. But either way, it looks like the author had to jump through some hoops to get the ISAPI filter setup correctly.
I also found this thread on the IIS7 forums where someone discuses having poor performance from ASP.NET 1.1. on x64 Win2k8. So from poor performance I would assume it worked to some extent. Unfortunately towards the end of the thread the author mentions encounter 500 errors, and then the discuss stops :-(
So from what I've read I would guess that its possible, but I would also guess that you would have less hassle if you could find some alternative that didn't involve both II7 and x64.
I have recently been testing our application on 64 bit 2008. Our application is .net framework 3.5 but we had a few problems.
The main issue we had was with 3rd party components such as Aspose words which were not built for 64 bit and caused an error. Unfortunatly you wont know without trying it..
.NET 1.1 is 32 bit only hence the app pool would have to run as 32 bit and use the classic pipeline. I haven't tried myself and I would do all that I can to not have to install .NET 1.1 on a 2008 server but it should work.
No problem. Just follow intructions on
http://learn.iis.net/page.aspx/472/how-to-install-aspnet-11-with-iis7-on-vista-and-windows-2008/
The option "CGI Restrictions" (last step) is found on IIS7 admin by clicking on the machine name.
I'm pretty sure that the article at http://learn.iis.net/page.aspx/472/how-to-install-aspnet-11-with-iis7-on-vista-and-windows-2008/ is for NON-R2 versions of Windows Server.
As far as I know ASP.NET 1.1 cannot run (or at least, not run well) on Windows.
There are some band-aid solutions around that various people have posted / blogged but this isn't supported by Microsoft.

Resources