跨 SharePoint 服务器复制内容类型

发布于 2024-11-26 15:43:52 字数 324 浏览 9 评论 0 原文

我正在开发一个 Windows 应用程序,它允许 SharePoint 管理员将内容类型从一台服务器复制到另一台服务器(跨两个 SharePoint 环境)。我现在拥有想要复制的内容类型信息。但是,我无法连接到目标服务器。当我尝试使用目标站点 URL 创建 SPSite 对象时,出现“FileNotFound”异常;我的代码库位于源服务器上。

我的问题:SharePoint 对象模型是否支持连接到远程服务器?如果没有,我可以使用 SharePoint Web 服务在远程服务器中创建内容类型对象吗?如果没有,是否有其他替代 API(除了创建我自己的 Web 服务)来实现此目标?

感谢您提前的帮助!

I am developing a Windows application that will allow SharePoint administrators to copy a content type from one server to another (across two SharePoint environments). I am at a point where I have the content type information that I want to copy. However, I am not being able to connect to the destination server. I get a "FileNotFound" exception when I try to create a SPSite object using the destination site URL; my code base is on the source server.

My question: Does the SharePoint object model support connecting to a remote server? If not, can I create a content type object in the remote server using SharePoint web services? If not, is there any other alternative API (other than creating my own web service) to achieve this goal?

Thank you for you help in advance!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烙印 2024-12-03 15:43:52

在谈论 SharePoint 2010 时,您应该看看内容类型中心。通过使用内容类型中心,您可以使用元数据服务应用程序在 SharePoint SiteCollections 和 Web 应用程序之间轻松共享 ContentType。

因此您不必手动复制内容类型。

When talking about SharePoint 2010, you should have a look at the Content Type Hub. By using the Content Type Hub, you're able to easily share ContentTypes across SharePoint SiteCollections and WebApplications using the Metadata Service Application.

So you'll not have to copy the Content Type manually.

平生欢 2024-12-03 15:43:52

要回答您的第一个问题,不,服务器对象模型只能用于本地环境。

Web Web 服务 ( http://msdn .microsoft.com/en-us/library/webs.webs_methods(v=office.12).aspx )具有创建/删除/更新内容类型的规定。

但请记住,内容类型理论上可能依赖于工作流、事件接收器、InfoPath 表单、解决方案等外部因素,这些外部因素将更难/不可能通过 OOTB Web 服务复制到新环境。

To answer your first question, no, the server object model can only used against the local environment.

The Webs web service ( http://msdn.microsoft.com/en-us/library/webs.webs_methods(v=office.12).aspx ) has provisions for creating/deleting/updating Content Types.

Keep in mind however that Content Types could theoretheticaly depend on externalities like workflows, event receivers, InfoPath forms, solutions and the like which will be harder/impossible to copy over to a new environment through the OOTB web services.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文