原因:项目引用了Newtonsoft.Json 6.0版本!在使用七牛SDK的时候关联升级为了9.0版本!在Qiniu上传的时候发现如下错误:
Newtonsoft.Json, Version=9.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2
百度了一圈发现解决方案均是在web.config中添加如下字段:
<runtime>
<assemblyBinding xmlns=”urn:schemas-microsoft-com:asm.v1″>
<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>
</assemblyBinding>
</runtime>
而我的web.config是正常的!在百度的过程中发现大家使用的均是4.0、6.0版本,而qiniu的SDK引用需要是9.0版本!
所以这就好办了!将oldVersion修改为0.0.0.0-9.0.0.0版本即可