2sxc - 课程/活动和注册应用程序错误
问题描述
我对新系统也有同样的问题,这是一个非常古老的错误。注册失败。 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) 在
解决方案
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?
推荐阅读
- c++ - 枚举可以在成员初始化列表中初始化吗?
- amazon-web-services - AWS 按计划将文件下载到 s3
- xamarin.android - 用户登录时以编程方式显示 ProgressBar
- c# - 在 Word 2016 (Office 365) VSTO 加载项中处理自动保存
- c# - 画布上的 Linerenderer 无法正确显示
- python - 通过 pyodbc 连接 python 和 SQL 时出现问题(未指定默认驱动程序)
- javascript - 如何创建在不同页面上有不同问题的测验?
- javascript - 是否可以在 useEffect 挂钩中运行的间隔内获取存储在 state 中的数组的当前长度?
- yii2 - Yii2 Editor中如何允许DIV标签
- php - PHP Echos 和 headers - Echos 没有被输出