Search code examples
asp.netiis-7web-config

Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive


I just installed vs 2010, followed by IIS in window 7. when building a website in .net framework 4.0 and convert this into application in IIS then its shows this error

enter image description here

If i remove the targetFramework="4.0" from web config file then it shows me a second error which is related to linq reference error

enter image description here

This all happening when i am using localhost to run my website but whenever i use just f5 in vs 2010 then its run perfectly.

When i want to attach my process with aspnet_wp.exe i don't find this process in my list.

I searched a lot of answers here. What am I missing.


Solution

  • The problem could be:

    • the Application Pool for your site is configured for .NET Framework Version = v2.0.XXXXX
    • .NET 4 isn't installed on your server.

    See also

    ... which helped me fix a similar issue.