locked
Targetframe work error RRS feed

  • Question

  • User-826886425 posted

    when i am trying to upload i've got the 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: The 'targetFramework' attribute in the <compilation> element of the Web.config file is used only to target version 4.0 and later of the .NET Framework (for example, '<compilation targetFramework="4.0">'). The 'targetFramework' attribute currently references a version that is later than the installed version of the .NET Framework. Specify a valid target version of the .NET Framework, or install the required version of the .NET Framework.

    Source Error: 

    Line 11:   </connectionStrings>
    Line 12:   <system.web>
    Line 13: <compilation debug="true" strict="false" explicit="true" targetFramework="4.5"> Line 14:       <assemblies>
    Line 15:         <add assembly="System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A" />
    Sunday, May 19, 2013 5:20 PM

Answers

  • User281315223 posted

    The targetFramework that is being specified appears to not be installed on the target environment or server. You will need to ensure that .NET 4.5 is installed (and if you are using external hosting or a hosting provider, ensure that they support .NET 4.5 on their servers).

    If you have installed .NET 4.5 then you will need to update your Application Pool that is housing this specific application and ensure that it is using the 4.5 Framework within IIS. (You can find step-by-step instructions on updating your Application Pool within IIS here)

    If this is not an option, you may want to consider downgrading your application to the highest available version based on your hosting provider or server (such as .NET 4.0 or .NET 3.5).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 20, 2013 11:48 AM

All replies

  • User-1716253493 posted
    maybe you have not configure your application to use net 4 application pool yet. The app still using net 2 in iis.
    Sunday, May 19, 2013 7:24 PM
  • User311508580 posted

    Hi Ghrawi,

    Please make sure that your provider support asp.net 4 hosting. Please kindly ask them to setup .net 4 for you and it will fix your issue.

    Sunday, May 19, 2013 11:30 PM
  • User-826886425 posted

    what if he refused , is there any way to make my application wroks , what if i change the tragetframework in web.config

    Monday, May 20, 2013 11:40 AM
  • User281315223 posted

    The targetFramework that is being specified appears to not be installed on the target environment or server. You will need to ensure that .NET 4.5 is installed (and if you are using external hosting or a hosting provider, ensure that they support .NET 4.5 on their servers).

    If you have installed .NET 4.5 then you will need to update your Application Pool that is housing this specific application and ensure that it is using the 4.5 Framework within IIS. (You can find step-by-step instructions on updating your Application Pool within IIS here)

    If this is not an option, you may want to consider downgrading your application to the highest available version based on your hosting provider or server (such as .NET 4.0 or .NET 3.5).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, May 20, 2013 11:48 AM
  • User-826886425 posted

    What is the way to downgrading  application?

    Monday, May 20, 2013 5:13 PM
  • User281315223 posted

    I would first check what version of .NET is running within your Application Pool that is containing your current application (so that you know what version to target).

    You can change the version of .NET that your application is targeting through the following steps : 

    1. Right-click your Project within the Solution Explorer in Visual Studio.
    2. Select the Properties option.
    3. Ensure the Application tab on the left is selected.
    4. Select the version of .NET that you wish to target from the "Target Framework" drop-down list.
    5. You will be prompted to close and re-open the Project for the changes to be completed, Select "Yes"

    Monday, May 20, 2013 5:20 PM
  • User-1716253493 posted

    Previous net framework (net 2/net 3.5) does not have targetframework property, try remove the property

    Monday, May 20, 2013 8:33 PM