How To Guides Org

How to change ASP.NET default target framework (from NET 2.0 to 4.0)

Ok so I wanted to run a NET 4.0 program after installing the IIS Web Server, but I ran into a problem that the default target framework is 2.0, let’s fix that!


Verify That IIS Management Tools Are Installed (IMPORTANT!)

0. Click on Start, then Administrative Tools, then on Server Manager

1. Step Alright, when I installed the IIS Web Server I didn’t take notice of all options and did not check the option IIS Management Tools. Start here:

2. Step Scroll down and you will see a list – verify that it’s greyed out and ticket – if not, tick all options and Install them:

Alrighty, Go On An Enter IIS Manager Into Your Search Bar

1. Step Click Start and enter IIS (if you followed steps 1 and 2 above correctly)

2. Step Now go on and uncollapse your web server and click on Application Pools:

3. Step Now right-click on Default App Pool and click on Advanced Settings

4. Step Now at the top click the arrow to change the framework from version 2.0 to 4.0

5. Step You are done, you have successfully changed the ASP NET default framework

Any questions on changing the framework for your ASP app?

From what I’ve learned so far, you can use the option "targetframework=4.0" ONLY in 4.0 apps, 2.0 does NOT support it at all!