This question already has an answer here:
Version Information on ASP.NET Server Error Page
(1 answer)
Closed 3 years ago.
I'm using IIS 8.5, .Net Framework version 4.7.2 installed. My legacy web application target framework is set to 4.7.2. As per my knowledge, it uses .Net CLR version v4.0. But, I'm confused with attached error where it show app is running under .Net Framework Version is 4.0. Please suggest how to validate this, I'm not sure why it is not showing 4.7.2.
4.0 is what you're supposed to see here. There are only 3 total IIS .Net runtimes for ASP.Net: 1.0, 2.0, 4.0. Even in these three, you rarely see 1.0 any more. Also, there is no 3.0 or 3.5 (they really still target 2.0), and Core is separate from IIS.
All the other point versions you may use, such as 4.7.2, resolve to one of those three runtimes within IIS.
Think of it this way: every version of .Net for 4.x has the same set of IL it can use. New point releases may add new features and types, but they still compile down to some set of 4.0-compatible IL. The addition of new types is why you may need to actually install 4.7.2 on the server before your site will run, but it's still IL for the 4.0 runtime.
If you really had a .Net version conflict, you'd see a 500-series HTTP error. This is only a 404. You need to find out why it doesn't see your test.aspx file.
Related
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.
We Have following MVC project where the build settings are as follows.
Application Build settings
And there we have the statement in the index page
#Html.Raw("Version: " + System.Environment.Version.ToString()); to show the ASP.NET version running.
when the Application is running through Visual studio it displays
My Question is why is it displaying 4.0 where it should be 4.7.2 looks like the application is using ASP.NET 4.0 to me.
Appreciate if someone could explain why we are getting a different runtime displayed here.
If it's the correct version 4.0 what should we do to make IIS express use 4.7.2
As far as I know, the IIS application pool is use CLR version not use .Netframework version.
The CLR is identified by its own version number. The .NET Framework version number is incremented at each release, but the CLR version is not always incremented.
For example, .NET Framework 4, 4.5, and later releases include CLR 4
More details, you could refer to this article.
I built a web app using dotNet 4.5. I went into IIS and created a new app pool but there was not 4.5 option, only 4.0 and 2.0. I went to install 4.5 and it says "already installed". I do a google search and see infact the registry and explorer show it to be installed.
What gives?
Although the .NET Framework Version column shows "v2.0" and "v4.0" for .NET Framework versions, these equate to ASP.NET 3.5 and ASP.NET 4.5.
Due to the internals of how application pools bind to .NET Framework versions, the actual version name written to configuration (and thus displayed in the tool) corresponds to the original .NET Framework file version.
Your question is tagged as IIS7 but the link information regarding .net versions is applicable.
Soruce: http://www.iis.net/learn/get-started/whats-new-in-iis-8/iis-80-using-aspnet-35-and-aspnet-45
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.
Can an ASP.Net 3.5 site run on a server with ASP.Net 4.0 on it?
On the server it has the 4.0 ASP.Net framework installed on it but the site I am making is for 3.5. Do i need to have 3.5 framework installed too to make the page work?
Yes, it does, but in all likelihood, the 3.5 framework should already be installed. If not, ensure that it gets installed.
However, it's usually best to install the versions in order... I have had issues in the past when 4.0 was installed first and a "lesser" version afterward, or when 2.0 was installed before 1.1. It's just good practice to install them in the correct order.
All .net framework installers include the previous version including the service packs.. well they do if you download them directly from microsoft's website which ensures its the newest version.
I've never installed multiple version (1.1, then 2.0, then 3.0 and soforth).. always just the newest and I've never encountered a problem. However if you do get issues that approach might be helpful.