【发布时间】:2010-11-18 15:37:36
【问题描述】:
警告:我是一名 asp.net 开发人员,在 SharePoint 中迈出了第一步。
所以,我正在编写一个控制台应用程序,该应用程序连接到同一台计算机上的 SharePoint Server 2007 站点,但在调用 SPSite() 构造函数期间似乎出现了问题。这是简化的代码:
using (SPSite siteCollection = new SPSite("http://server/AwesomeSite"))
{
//when i set a breakpoint on this line and inspect the siteCollection object,
//most of it's properties (for example siteCollection.AllWebs.Names) throw an
//exception, which leads me to the conclusion that something went wrong during
//the constructor above.
SPWebCollection site = siteCollection.AllWebs;
SPWeb web = site[""];
SPList list = web.Lists["AwesomeList"]; //exception occurs here
}
SPException 文本:
操作中止(HRESULT 异常:0x80004004 (E_ABORT))我听从了Sharepoint SPSite 的建议并检查了:
- 用户是服务器场管理员。
- 用户对内容数据库具有读取和写入权限。
- 用户是网站集管理员。
- 用户有权访问 Windows SharePoint Services 站点或代码迭代的 SharePoint Server 2007 站点。
而且它们都是正确的。还有什么可能导致这种情况发生?
【问题讨论】:
标签: sharepoint sharepoint-2007