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

来源:互联网 发布:叉叉助手软件更新 编辑:程序博客网 时间:2024/06/04 01:35

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

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的版本。)

0 0
原创粉丝点击