2017-07-07 79 views
0

我已经将MVC3应用程序升级到MVC4应用程序并将目标框架更改为4.0。没有构建错误。但是在运行时,系统无法加载telerik扩展网格存在的页面。将应用程序从MVC3升级到MVC4后,telerik扩展网格抛出空引用错误

我得到以下错误

指数超出范围异常的GridBuilder

所以,我已经改变了Telerik的延伸电网剑道格但得到下面的错误。

在在 System.Collections.ObjectModel.Collection 1.set_Item(Int32 index, T value) at System.Web.Mvc.ControllerContext.get_RequestContext()
at Kendo.Mvc.UI.NavigatableExtensions.GenerateUrl(INavigatable navigatable, ViewContext viewContext, IUrlGenerator urlGenerator)
at Kendo.Mvc.UI.Fluent.CrudOperationBuilderBase
1.SetUrl() System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument 说法,ExceptionResource资源)在 Kendo.Mvc.UI.Fluent.CrudOperationBuilderBase 1.Action(String actionName, String controllerName, Object routeValues) at Kendo.Mvc.UI.Fluent.CrudOperationBuilderBase 1。 Action(字符串 actionName,字符串控制器名称)

回答

0

支持ASP.Net MVC的Telerik扩展仅支持MVC版本1,2和3。

[http://docs.telerik.com/help/aspnet-mvc/getting-started-installation-instructions.html#Installing][1]

当您升级从MVC3到MVC4遗留应用程序,需要告诉编译器通过修改根Web.config文件中使用的版本3编译像Telerik的扩展第三方DLL。

<dependentAssembly> 
    <assemblyIdentity name="System.Web.Mvc" 
     publicKeyToken="31bf3856ad364e35" /> 
    <bindingRedirect oldVersion="1.0.0.0-3.0.0.0" newVersion="4.0.0.0"/> 
    </dependentAssembly> 
相关问题