8

I have just uploaded my website on a hosting site.

I get the following error while I try to access my site.

Server Error in '/' Application.

Configuration Error

Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.

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

Line 7:<system.web>
Line 8:<customErrors mode="Off"/>
Line 9:<compilation debug="true" targetFramework="4.0">

Please help, Thank You Parth.

Parth Kalra
  • 127
  • 1
  • 1
  • 10
  • Please make sure you setup your site on .net 4 version. It is very clear about the above error message. Or please ask your hosting provider to setup .net 4 on your site. :) –  Jul 09 '12 at 05:07

2 Answers2

21

This normally happens when your application pool in IIS is set to 2.0 instead of 4.0

John Mitchell
  • 9,653
  • 9
  • 57
  • 91
  • Check this link for a step by step guide to have your AppPool switched to 4.0 http://stackoverflow.com/questions/4890245/how-to-add-asp-net-4-0-as-application-pool-on-iis-7-windows-7 – Sandip Subedi Jan 24 '17 at 20:09
11

For convenience of others, go to control panel -> Admin tools -> IIS Manager -> View Application Pool -> Change .NET version from 2.0 to 4.0

George
  • 6,006
  • 6
  • 48
  • 68