首页 > 解决方案 > 课程/活动和注册应用程序错误

问题描述

我对新系统也有同样的问题,这是一个非常古老的错误。注册失败。 https://github.com/2sic/app-events-and-courses/issues/1 我正在寻找解决方法。

谢谢托马斯

我尝试了三个不同的系统,但没有成功。

var course = AsDynamic(App.Data["Course"].List[Convert.ToInt32(Request.QueryString["cid"])]);

错误:System.Web.HttpCompileException (0x80004005): d:\home\site\wwwroot\Portals\43\2sxc\Courses_Course-Registration.cshtml(12): 错误 CS0021: 无法使用 [] 将索引应用于“类型”的表达式System.Collections.Generic.IEnumerable' 在 System.Web.Compilation.BuildManager.PostProcessFoundBuildResult(BuildResult 结果,Boolean keyFromVPP,VirtualPath virtualPath)在 System.Web.Compilation.BuildManager.GetBuildResultFromCacheInternal(String cacheKey,Boolean keyFromVPP,VirtualPath virtualPath,Int64 hashCode , 布尔确保IsUpToDate) 在

标签: 2sxc

解决方案


I assume this is some very old code - because the List object changed in 2017. So first of all let's get you going:

Read this blog - it tells you what changed and how to fix it: https://2sxc.org/en/blog/post/fixing-the-breaking-change-in-2sxc-9-8-list-instead-of-dictionary

Since you installed a new system (that's what I understand), could you point me to where you got the code - so I can have the original fixed?


推荐阅读