Today I was converting a website to the new .NET Framework 4.0 version. This was an existing website and was already running on a Windows Server 2003 with IIS 6.0 system. After I upgraded the files of the website, changed the config file to the right settings and changed the .NET Framework version on the ASP .NET tab in the properties window of the website to version 4 instead of 2, I was getting a “Page could not be found” error. After restarting the server, registering the .NET Framework again to IIS, I still had the same error on my screen.
When I searched the internet for a solution, I found the blog of Johan Driessen. One blog post explained the error that I was getting with the right solution. Just check if your ASPNET_ISAPI is set to the right .NET Framework (version 4). If not, enable it with the provided command. The only difference on the command in his blog and the one that I used is that I used Framework64 and not Framework.
Today I migrated an old project from Visual Studio 2008 to Visual Studio 2010 and with that, I changed the Framework to version 4.0. This is currently the newest .NET Framework. The solution contains a lot of different projects so the challenge was to convert all the target frameworks to the 4.0 version.
There are a couple ways to this:
- Change every project by hand. (Open the properties of every project and select the target framework that you want);
- Edit the project files by hand in notepad;
- Use the macro of Scott Dorman.
The macro of Scott can be found here. Just place the macro on the right place on your pc and execute it. After you executed the macro a popup is shown with the question to which target framework you want to migrate. Choose your framework and press OK.
That’s it!!! Safes a lot of time!!
You can execute a Macro in the Tools->Macros->Macros Explorer window.