locked
Issue with error in hosting my application RRS feed

  • Question

  • User1182587605 posted

    Dear all,

    I am trying to deploy a project visual studio 2015 project in IIS 8 and I get the following error :

    hosting_error

    The target framework in the <compilation> element of the web.config file is used only to target version only to 4.0 and later of the .NET framework(for example <target framework="4.0">. The target framework currently references to a version that is later than the installed version of the .NET framework. Specify a valid version of the .NET framework, or install the required version of .NET framework.

    My .NET version is 4.5.2. So, how can I solve this issue. Please help me in this. Should I install VS 2015 in my server where the IIS 8 resides. I have checked the App_pools, They are targeted to 4.0 version. Please help me in this.

    Regards,

    Deepak

    Tuesday, November 15, 2016 4:02 PM

Answers

  • User932909087 posted

    Hi acmedeepak,

    You just need to change your application pool to run on .net 4 version. Just make sure that your server support .net 4 version.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 21, 2016 8:15 AM

All replies

  • User-359936451 posted

    In VS click on WebSite menu link then click on Start Options, then click on the Build link in the left pane. under target framework, select .Net Framework 4. Or the version you are targeting.

    check your web config afterward to make certain all references indicate the correct target.

    Tuesday, November 15, 2016 4:37 PM
  • User-2057865890 posted

    Hi Deepak,

    Is .NET Framework 4.5.2 installed on your server? Please install it on the server.

    Installing the .NET Framework

    https://msdn.microsoft.com/en-us/library/5a4x27ek%28v=vs.110%29.aspx 

    Best Regards,

    Chris

    Wednesday, November 16, 2016 9:34 AM
  • User-359936451 posted

    Just make sure that all versions of .Net match and they will obviously need to be installed.

    Wednesday, November 16, 2016 3:22 PM
  • User1182587605 posted

    My issue is not solved yet. Will let you know. there is no VS 2015 in my server but am trying to use app pool of 4.0 to run my application.

    Wednesday, November 16, 2016 6:14 PM
  • User932909087 posted

    Hi acmedeepak,

    You just need to change your application pool to run on .net 4 version. Just make sure that your server support .net 4 version.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, November 21, 2016 8:15 AM