Domanda

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 small piece of content in my web.config file :

    <compilation debug="true" targetFramework="4.0">
      <assemblies>
        <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
        <add assembly="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089" />
        <add assembly="System.Speech, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" />
      </assemblies>
    </compilation>

I am getting below 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=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
È stato utile?

Soluzione

App Pool on your server must be set to run ASP.NET 4.0.Change it.

If its not there Install .NET 4

Unrecognized attribute 'targetFramework'.

Altri suggerimenti

Go the IIS and check the application pool you are using through Advance setting of your.

And then Make sure that the .Net Framework of the App Pool you are using must be set to 4.0.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top