1

我正在运行 webapi 并收到以下错误,

{
"Message": "An error has occurred.",
"ExceptionMessage": "Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.",
"ExceptionType": "System.IO.FileNotFoundException",
"StackTrace": null
}

我在本地运行 MVC4、VS.NET 2012 没有问题,在我的 web.config 中,我也重定向了

<dependentAssembly>
        <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-4.0.0.0" newVersion="4.0.0.0" />
      </dependentAssembly>

我有其他 web api,但它运行良好,这是唯一给我带来问题的,方法也没有什么特别之处。有什么想法或类似的经历吗?

4

0 回答 0