Click here to Skip to main content
14,421,274 members
Rate this:
Please Sign up or sign in to vote.
See more:
i put my asp.net project on IIS7 but it gives error that .net framework 3.5 is not a targeted framework. i downloaded and installed framework 4.0 but still doesn't work. what could be the problem??
Posted
Rate this:
Please Sign up or sign in to vote.

Solution 1

Refer - How to: Upgrade an ASP.NET Web Application to ASP.NET 4[^].
Quote:
It is recommended that you use Visual Studio to perform the tasks that are required in order to upgrade. 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 with the .NET Framework version 4.
Comments
Basit Elahi 28-Apr-14 3:13am
   
my project was developed in 4.0 but where i am deploying it, that pc has framework 3.5
   
If your Project is developed in IIS 4.0, then it should work fine in IIS. No need to downgrade that to 3.5.
Rate this:
Please Sign up or sign in to vote.

Solution 2

You need to check the app pool of your web application having correct .net framework or not.
Go to IIS and click on Application Pools. Can you see application pool starting with ASP.NET 4.0? if it is there, you have successfully registered .net 4.0 on IIS.
if you don't have 4.0 app pool try below steps in the answer
How to add ASP.NET 4.0 as Application Pool on IIS 7, Windows 7[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100