Click here to Skip to main content
14,424,734 members
Rate this:
Please Sign up or sign in to vote.
I have configured my website to IIS but I am getting Configuration Error.
I have also uploaded same project but at that time there were not occured any error.

This is code in my web.config file :

<?xml version="1.0" encoding="UTF-8"?>
  For more information on how to configure your ASP.NET application, please visit
    <section name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup" />
        <jsonSerialization maxJsonLength="500000000" />
        <add value="Index.aspx" />
    Connection String
    <sessionState timeout="60"></sessionState>
    <trust level="Full" />
      <trustLevel name="Full" policyFile="internal" />
    <compilation debug="true" targetFramework="4.0">
        <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="mscorlib, Version=, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Speech, Version=, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
        <add src="~/UserControls/Chart.ascx" tagName="Chart" tagPrefix="MAS" />
    <bindings />
    <client />

I am getting Following Error :

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 38:       <trustLevel name="Full" policyFile="internal" />
Line 39:     </securityPolicy>
Line 40:     <compilation debug="true" targetFramework="4.0">
Line 41:       <assemblies>
Line 42:         <add assembly="System.Design, Version=, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />

Displaying Error in 40th Line in above code...
If anything is remaining please tell me....
Please help me...
Rate this:
Please Sign up or sign in to vote.

Solution 1

I think you have not configured application in IIS correctly.Remove application from inetmgr and host it once again with selection of application pool 4.0

Nirav Prabtani
Rate this:
Please Sign up or sign in to vote.

Solution 2

check your Application Pools of IIS and set all of them to 4.0 [.NET Framework Version]...
Rate this:
Please Sign up or sign in to vote.

Solution 3

First remove the application from iis and inetpub then Run the Aspnet regiis tool .Then again add your application to inetpub,and set application pool to 4.0 classic .

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