简体   繁体   中英

Asp.net MVC4 Website hosting issue

I have developed a asp.net mvc4 website using VS2010 and it is running perfectly fine after publishing and hosting it to the same developer machine.

then i hosted the same on to the testing system which has only .net framework(4.5.1) and asp.net mvc4 run time installed, then it is giving a run time exception stating that

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.

i checked all my references in my project but there is no Newtonsoft.Json referenced. Any help is greatly appreciated.

Please refer the screenshot 在此处输入图片说明

I guess in your web.config you have lines like

<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>

remove those that give errors like the json in this case and update that package from nuget :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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