部署到 SharePoint 时 ObjectDataSource 找不到类型
将包含 ASP.NET 页面的功能部署到我们的开发 SharePoint 服务器时,我收到以下错误:
System.InvalidOperationException:找不到 ObjectDataSource“odsYears”的 TypeName 属性中指定的类型。
我们的 .dll 正在部署到 GAC,我们的页面正在部署到 12 hive 中相应的 Features 目录。我们的 Sandbox SharePoint 服务器上没有收到此错误。我反汇编了 .dll 以确保该类正在部署并且一切看起来都正常。
有谁知道为什么这不适用于我们的 SharePoint 环境之一?
谢谢。
I'm receiving the following error when deploying a feature containing ASP.NET pages to our development SharePoint servers:
System.InvalidOperationException: The type specified in the TypeName property of ObjectDataSource 'odsYears' could not be found.
Our .dll is being deployed to the GAC and our pages are being deployed to the the respective Features directory in the 12 hive. We are not receiving this error on our Sandbox SharePoint server. I disassembled the .dll to be sure the class was being deployed and everything looked ok.
Does anyone have any ideas on why this would not work on one of our SharePoint environments?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
发现错误,我需要在 SharePoint web.config 文件的“程序集”节点中添加对 .dll 的引用 - 以防其他人遇到此问题。
Found the error, I needed to add a reference to our .dll in the "assemblies" node of the SharePoint web.config file - in case anyone else comes across this.
默认情况下,ObjectDataSource 在 web.config 的 SafeControls 部分中处于禁用状态。
ObjectDataSource is by default disabled in the SafeControls section of the web.config.