Click here to Skip to main content
15,886,830 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
while hosting my website on iis7.5 i am getting following error
Unrecognized attribute 'targetFramework'. Note that attribute names are case-sensitive
at line
<compilation debug="true" targetframework="4.0">

my web config file contains

XML
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <connectionStrings>
        <add name="dbconn" connectionString="Dsn=recruitment;uid=sa" providerName="System.Data.Odbc" />
    </connectionStrings>
    <system.web>
        <httpHandlers>
            <add path="Reserved.ReportViewerWebControl.axd" verb="*" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" validate="false" />
        </httpHandlers>
        <compilation debug="true" targetFramework="4.0">
            <buildProviders>

            </buildProviders>
            <assemblies>
                <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
                <add assembly="System.Web.Extensions.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
                <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" /></assemblies></compilation>
    </system.web>
    <system.webServer>
        <validation validateIntegratedModeConfiguration="false" />
        <handlers>
            <add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        </handlers>
        <directoryBrowse enabled="true" />
    </system.webServer>
</configuration>
Posted
Updated 3-Aug-14 22:47pm
v2

1 solution

This typically happens when you have an attribute of targetFramework="4.0" in the web.config but the App Pool is set to run ASP.NET 2.0. The targetFramework attribute is entirely unrecognized by ASP.NET 2.0 - so changing it to 2.0 won't have the desired effect.
 
Share this answer
 
Comments
Ashwini Thakare 6-Aug-14 13:11pm    
i have changed the application pool to 4.319
but then also my website is not visible on iis

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900