繁体   English   中英

Asp.net MVC4网站托管问题

[英]Asp.net MVC4 Website hosting issue

我使用VS2010开发了一个asp.net mvc4网站,在将其发布并托管到同一台开发人员计算机上后,它运行得非常好。

然后我将其托管到仅安装了.net framework(4.5.1)和asp.net mvc4运行时的测试系统上,然后给出了运行时异常说明

Could not load file or assembly 'Newtonsoft.Json, Version=4.5.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed' or one of its dependencies. The system cannot find the file specified.

我检查了我项目中的所有引用,但没有Newtonsoft.Json引用。 任何帮助是极大的赞赏。

请参考截图 在此处输入图片说明

我猜在你的web.config中你有这样的行

<dependentAssembly>
 <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
 <bindingRedirect oldVersion="0.0.0.0-6.0.0.0" newVersion="6.0.0.0" />
 </dependentAssembly>

在这种情况下,删除那些提供json之类错误的代码,并从nuget中更新该包:)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM