unable to cast object of type 'Microsoft.SharePoint.SPsite' to type 'Microsoft.SharePoint.SPWeb'
来源:互联网 发布:vb comdlg32.ocx 编辑:程序博客网 时间:2024/05/19 03:23
ERROR:unable to cast object of type 'Microsoft.SharePoint.SPsite' to type 'Microsoft.SharePoint.SPWeb' during deploy MOSS 2010 solution
原因:程序中有涉及到spweb的引用,注释掉就可以了。
//SPSite curSite = (SPSite)properties.Feature.Parent;
//SPWeb curWeb = curSite.RootWeb;
SPWeb curWeb = (SPWeb)properties.Feature.Parent;
如果是想发布到web上,将下面的scope设置为web
- unable to cast object of type 'Microsoft.SharePoint.SPsite' to type 'Microsoft.SharePoint.SPWeb'
- Unable to cast COM object of type 'System.__ComObject' to interface type 'Microsoft.Office.Interop.E
- Unable to cast object of type 'System.Web.HttpApplication' to type 'Microsoft.Practices.CompositeWeb
- Unable to cast COM object of type Microsoft.Office.Interop.Excel.ApplicationClass' ...
- Unable to cast COM object of type 'System.__ComObject' to class type 的解决办法
- Unable to cast COM object of type 'Word.ApplicationClass' to interface type 'Word._Application'"
- 【问题处理】Unable to cast object of type 'System.DBNull' to type 'System.String'.
- 解决方法:Unable to cast COM object of type 'Shell32.ShellClass' to interface 'Shell32.IShellDispatch5'
- SharePoint debug - Exception of type 'Microsoft.SharePoint.SoapServer.SoapServerException' was throw
- Sharepoint习题——SPSite和SPWeb
- Chapter 1: Introduction to Microsoft SharePoint 2007
- Microsoft to Demo SharePoint 2016 at Ignite 2015
- 警告The argument of type String[] should explicitly be cast to Object[] for the invocation of the vara
- SharePoint solution Error: Misconfiguration of the Microsoft SharePoint State Service
- SharePoint log分析——“Detected use of SPRequest for previously closed SPWeb object. ”
- cast of Objective-C pointer type 'NSString *' to C pointer type 'CFStringRef' (aka 'const struct __C
- Microsoft SharePoint Portal Server
- Microsoft.SharePoint.Menu
- C语言的谜题和逗号表达式
- 2011-10-26
- 项目管理其实可以简单一点——团队建设
- android SQLite数据库基本操作示例
- Broadcast
- unable to cast object of type 'Microsoft.SharePoint.SPsite' to type 'Microsoft.SharePoint.SPWeb'
- i++ 和 ++i 区别与分析
- 函数调用堆栈分析
- WIFI
- JBOSS 5.0与tomcat 6.0端口设置
- Socket
- Python
- 使用crossdomain.xml让Flash/Flex可以跨域传输数据
- Davlik虚拟机技术揭秘之一