Unrecognized attribute 'targetFramework' Error

While creating a copy of an existing DNN site, I ran into the following error.

Parser Error Message: Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive.

Line 116:<compilation debug="true" strict="false" targetFramework="4.0">

At first I was like I just made a copy of the site and created a new site in IIS7 on my Windows 7 machine. Why I am getting this error? Very quickly I realized that, the solution of the problem is right there in the error screen itself. If you look at the bottom of the message, you will find the following line.

Version Information: Microsoft .NET Framework Version:2.0.50727.4952; ASP.NET Version:2.0.50727.4927

Although I compiled the DNN site for ASP.Net 4.0 but my application is configured to use application pool that uses ASP.Net 2.0. Simply goto settings of your site, move it to application pool that uses ASP.Net 4.0 and you will be good to go!

comments powered by Disqus

Search

Social

Weather

Monthly Posts

Blog Tags