Ninject System.Web.Mvc, Version=3.0.0.0 错误

我在运行 资料书附件的 程序的时候 出现了这个错误 , 在网上找了下解决方法

Could not load file or assembly 'System.Web.MVC, Version=3.0.0.0 in WCF project .NET framework 4

In .NET 4.0 - wcf APPLICAITOn project, I have added - DI using- nInject.WCF.Extension package.

VErsio is : Ninject.Extensions.Wcf.3.2.1.0

when try to run the WCF service on browser, some times it throws below exception.

Could not load file or assembly 'System.Web.MVC, Version=3.0.0.0 in WCF project .NET framework 4

Some time also throw below exception:

CanNot:null root. Argument exception

Please help me, how to resolve this.

Thanks

(在。净4.0 - wcf应用项目,我有- DI使用nInject.WCF补充道。扩展包。 版本是:Ninject.Extensions.Wcf.3.2.1.0 当尝试在浏览器上运行WCF服务,有时又低于例外。 无法加载文件或组装的包含。MVC,Version = 3.0.0.0 WCF项目。净框架4 一段时间还抛出以下异常: 不能:零根。参数异常 请帮助我,如何解决这个问题。 谢谢)


Update the Application web.config File.

Be sure to make these changes in the app web.config file, not the web.config file in the Views folder.

(更新应用程序web。配置文件。 要确保这些变化在应用程序的web。配置文件,而不是网络。配置文件在文件夹视图。)

 <runtime>
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
      <dependentAssembly>
         <assemblyIdentity name="System.Web.Mvc" publicKeyToken="31bf3856ad364e35" />
         <bindingRedirect oldVersion="1.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
     </dependentAssembly>
    </assemblyBinding>
</runtime>

This example referes to MVC 5.Set oldVersion and newVersion according to your project's MVC version.

(这个例子参考MVC 5。设置oldVersion和新版本根据您的项目的MVC的版本。)

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值