I have built one website using the .net framework 4.5 . Here is the code snippet from the Web.config file.
<compilation debug="true" targetFramework="4.5"/>
I have hosted the same website in my local machine IIS7. While creating a new website, Application pool I selected as 4.0. When I try to access the same from the browser I am getting below error.
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.
Source Error:
Line 14: -->
Line 15: <system.web>
Line 16: <compilation targetFramework="4.5"/>
Line 17: <httpRuntime/>
Line 18: <pages controlRenderingCompatibilityVersion="4.0">
Source File: C:\inetpub\wwwroot\polygontechnologies.com\web.config Line: 16
Version Information: Microsoft .NET Framework Version:2.0.50727.5485; ASP.NET Version:2.0.50727.5491
So, as of now I have targetFramework="4.5" in web.config and in IIS application pool it is 4.0.
Can anyone help me in fixing the issue. TIA