Last post Jun 07, 2017 08:58 PM by DoctorWho
Jun 06, 2017 08:11 PM|DoctorWho|LINK
I'm responsible for an older ASP.NET WebForms app. When the developer created this app .NET 2 was the hot kid on the block. I'd like to make changes to it, but I'm going to take a slow approach to upgrading the whole site, starting with upgrading from .NET
2 to .NET 4.5. There are 2 versions of the website, one is production and the other is test. Naturally, I'll start with test. They both use the application pool using v2. I know that .NET 4.5 is installed on the server and there's already an application pool
in IIS for it. What I don't know is what are the steps I should take? Should I get onto the server and assign the test website to the v4 version in IIS, then publish to the site? Or should I publish to the site and then upgrade the website in IIS to v4?
Jun 06, 2017 09:52 PM|mgebhard|LINK
I would branch a copy of the application from source control to my local development machine. Build and fix any errors or warning. Next, change the target framework and fix any issues or warnings. do a bit of integration testing, then deploy to test and
Jun 07, 2017 01:18 AM|oned_gk|LINK
In test site, upgrade the site using Visual Studio then test it.
If ok, copy the file has changed to production then change app pool.
AFAIK, almost no deferent between net 2 and net 4. Some changes only in web.config.
There are some new features in net 4, but net 2 aspx file will work in net 4.
Jun 07, 2017 08:48 AM|Cathy Zou|LINK
I should take? Should I get onto the server and assign the test website to the v4 version in IIS, then publish to the site? Or should I publish to the site and then upgrade the website in IIS to v4?
The two ways you provided have little difference.
However, as far as I know, If you use Visual Studio to open a Web project that was developed for the .NET Framework 2.0, the .NET Framework 3.0, or the .NET Framework 3.5, Visual Studio can automatically perform all the changes to Web.config files that
are required to be able to run using .NET Framework 4.5. If the project is a local IIS project and you are using IIS 7.0, Visual Studio can also reassign the application to an application pool that is associated with the .NET Framework 4.
So, I suggest that you could upgrade your application by using Visual Studio Then to associate an IIS application with the .NET Framework 4.
If you do not use Visual Studio to perform the upgrade automatically, you must manually edit the Web.config file and must manually associate the application in IIS
For detailed information and steps. please refer to the article in the following link:
Jun 07, 2017 09:31 AM|PatriceSc|LINK
You could also have a look at
https://msdn.microsoft.com/en-us/library/dn458358(v=vs.110).aspx#Migrating+from+versions+before+the+.NET+Framework+4 at least once to see what could affect your app (such as HTML rendering changes).
Jun 07, 2017 03:59 PM|DoctorWho|LINK
Thank you everyone. I'll start on the test website using suggestions here. Will let you know how it goes.
Jun 07, 2017 08:58 PM|DoctorWho|LINK
I found that I had to change application pool IIS had associated with the web app before I could publish to it. I changed it to ASP.NET v4 and published it, using Web Deploy. Works fine. Will let the users test it.