无法在服务器的本地主机上运行Web API

我已经使用dot net frame work 4.5MySQL Database在Visual Studio 2015中创build了一个web API 。 在我的系统上, API是完美的。 但是当我部署在我的服务器上,然后在本地运行,它给了我下面的错误

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.

 <system.web> <authentication mode="None" /> <compilation targetFramework="4.5.2" /> <httpRuntime targetFramework="4.5.2" /> <httpModules> 

以下是我的项目的属性

在这里输入图像说明

在服务器上我已经安装了IIS的以下function

在这里输入图像说明

安装后,我检查了iis但是没有.NET 4.5的POOL 。 同时添加新的池我找不到4.5版本。

在这里输入图像说明

我到目前为止做了什么?

  1. 将我的API的框架更改为4.0。 但它不起作用,因为一些包被删除。
  2. 在服务器端,删除所有IISfunction,然后将其添加回来。 仍然没有进展。
  3. 在另一台机器上安装新的服务器并完成安装。 但还是4.5框架不显示。

注意

我正在使用Windows Server 2012 R2

我坚持它,不知道该怎么做。 任何帮助将不胜感激。