从 WCF 服务访问 SharePoint 内容(列表) [英] Accessing SharePoint content (list) from a WCF service

查看:78
本文介绍了从 WCF 服务访问 SharePoint 内容(列表)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编写了一个 WCF 服务,它尝试从 SharePoint 中的特定列表读取列表项.出于测试目的,我使用 Visual Studio ASP.Net 开发服务器运行 WCF 服务.我将站点 ID 传递给 Web 服务,并尝试从 Web 服务打开列表并读取项目.但是当我尝试阅读这些项目时,我收到以下错误 -

I've written a WCF service which tries to read the list items from a particular list in SharePoint. For testing purposes I run the WCF service using Visual Studio ASP.Net Development server. I pass the Site ID to the web service and from the web service I try to open the List and read the items. But when I try to read the items I'm getting the following error -

此操作只能执行在连接到计算机的计算机上拥有的用户的服务器场SQL Server 中的读取权限配置数据库.连接此服务器到服务器场,使用SharePoint 产品和技术配置向导,位于开始菜单中管理工具.

This operation can be performed only on a computer that is joined to a server farm by users who have permissions in SQL Server to read from the configuration database. To connect this server to the server farm, use the SharePoint Products and Technologies Configuration Wizard, located on the Start menu in Administrative Tools.

这里有一些事实 -

  1. 我正在使用 SharePoint 2007 x64Windows Server 2008 x64,它是一个单台服务器安装(无场)
  2. 我是农场管理员
  3. 我是系统管理员(但不是域管理员)
  4. 我是 SQL Server 的系统管理员2005 服务器,其中是 SharePoint有自己的数据库
  5. 我是网站集列表所在的管理员礼物
  6. 我打开 Visual Studio 2010 作为管理员
  7. 在任务管理器中,ASP.Net开发服务器进程是在我的帐户下运行

我不知道为什么我会收到那个错误.有什么想法吗?

I don't have any idea why I'm getting that error. Any ideas?

推荐答案

Okie.我发现了这个问题.这与我在 SharePoint 2007 中切换到 x64 开发以来一直面临的问题有关.当我将 WCF 服务部署到 IIS 时,一切正常.

Okie. I found the issue. It is related to the same problem which I've been facing since I switched to x64 development in SharePoint 2007. When I deployed the WCF service to IIS everything worked fine.

使用 Visual Studio 2010(无论我的项目的目标平台是什么),我都无法通过简单的控制台应用程序或简单的 asp.net Web 应用程序访问 SharePoint 内容.我已经清楚地知道问题出在 x86 x64 的东西上,直到现在我都无法解决它.我已经被这个困扰很久了.

Using Visual Studio 2010 (no matter what my target platform of my project is) I've never been able to access SharePoint content through a simple console application or a simple asp.net web application. I've clearly understood that the problem is with the x86 x64 stuffs and I've not been able to resolve it till now. I've been haunted by this for so long now.

如果您对此答案有任何意见,请发表.

If you have any comments on this answer please post it.

旧参考 - 打开 SPSite 对象时 Filenotfound 异常 - x64

这篇关于从 WCF 服务访问 SharePoint 内容(列表)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆