在 SharePoint Server 中连接到远程服务器场上的服务应用程序

适用于:yes-img-132013 yes-img-162016 yes-img-192019 yes-img-seSubscription Edition no-img-sopSharePoint in Microsoft 365

可以通过在 SharePoint Server 中发布一些服务应用程序,使这些服务应用程序能够通过远程连接进行使用。 通过发布服务应用程序,可以优化资源并避免冗余,并可以在不安装专用的企业服务服务器场的情况下提供企业范围的服务。

对于已由其他服务器场共享的服务应用程序,如果您知道该服务器场的发现服务地址或该服务应用程序的地址,则可以连接到该服务应用程序。 请注意,仅在远程服务器场的服务器场管理员已发布了服务应用程序的情况下,您才能连接到远程服务器场上的服务应用程序。

开始此操作之前,请查看在 SharePoint Server 中跨服务器场共享服务应用程序,了解有关先决条件的信息。

使用管理中心连接到远程服务器场上的服务应用程序

  1. 确认您是 SharePoint 组“Farm Administrators”的成员。

  2. 在消费型服务器场中的服务器上,在管理中心单击“应用程序管理”,然后单击“管理服务应用程序”。

  3. 在功能区上,单击“连接”。

  4. 在“连接”下拉菜单上,单击要连接到的服务应用程序的类型。

  5. 在“连接到远程服务应用程序”页上,在“场或服务应用程序地址”文本框中键入适当的 URL,然后单击“确定”。

    注意

    您可以从发布方服务器场的管理员处获取此 URL。 有关详细信息,请参阅在 SharePoint Server 中发布服务应用程序。 此步骤中可以使用两种类型的 URL:服务应用程序的 URL 或远程场拓扑服务应用程序的 URL。 如果使用服务应用程序的 URL,则本过程的步骤 6 中将只列出对应的服务应用程序。 如果使用拓扑服务的 URL,则本过程的步骤 6 中将列出服务器场中的所有服务应用程序。

  6. 新的 “连接到远程服务应用程序 ”对话框显示与步骤 5 中键入的 URL 匹配的服务应用程序。 Click the row that contains the name of the service application, and then select the check box to add the service application connection to the farm's default list of service application connections (that is, the default proxy group). Click OK.

  7. You are prompted to change the connection name. Type a new name into the Connection Name text box or leave the default name, and then click OK.

  8. 建议您使用在服务器场之间交换信任证书 (SharePoint Server) 中的说明在两个服务器场之间建立信任。

  9. 创建新连接后,必须单击“确定”以完成本过程。

  10. 将新的服务应用程序连接与本地 Web 应用程序关联。 有关如何执行此操作的信息,请参阅在 SharePoint Server 中添加或删除 Web 应用程序的服务应用程序连接

使用 PowerShell 连接到远程服务器场上的服务应用程序

  1. 确认您具有以下成员身份:

    • SQL Server 实例上的 securityadmin 固定服务器角色。

    • 要更新的所有数据库上的 db_owner 固定数据库角色。

    • 运行 PowerShell cmdlet 的服务器上的 Administrators 组。

    • 添加至少具有以上最小权限的成员。

    管理员可以使用 Add-SPShellAdmin cmdlet 授予使用 SharePoint Server cmdlet 的权限。

    注意

    [!注意] 如果您不具有这些权限,请联系您的安装管理员或 SQL Server 管理员来请求权限。 有关 PowerShell 权限的其他信息,请参阅 Add-SPShellAdmin

  2. 启动 SharePoint 命令行管理程序。

  3. 在 PowerShell 命令提示符处,键入以下命令:

    Receive-SPServiceApplicationConnectionInfo -FarmUrl <PublishingFarmTopologyURL>
    

    其中 <PublishingFarmTopologyURL> 是通过在发布场上运行 Get-SPTopologyServiceApplication cmdlet 检索的信息。 有关详细信息,请参阅 在 SharePoint Server 中发布服务应用程序

  4. 在 PowerShell 命令提示符处,键入以下命令:

    New-SPServiceApplicationProxy -Name " <ServiceApplicationProxyName>" -Url "<PublishingFarmTopologyURL>"
    

    其中:

    • <ServiceApplicationProxyName> 是使用服务器场上的服务应用程序连接的唯一名称。

    • <PublishingFarmTopologyURL> 是上一命令中用到的服务应用程序拓扑 URL。

    每种类型的服务应用程序都有一个应使用的特定 PowerShell cmdlet,而不是 New-SPServiceApplicationProxy。 (这些 cmdlet 在“另请参阅”部分列出。) 例如,以下命令将创建一个名为“MetadataServiceProxy1”的新托管元数据服务应用程序代理,以连接到位于所述 URL 的服务应用程序。

    New-SPMetadataServiceApplicationProxy -Name "MetadataServiceProxy1" -Uri "
    urn:schemas-microsoft-com:sharepoint:service:9c1870b7ee97445888d9e846519cfa27#authority=urn:uuid:02a493b92a5547828e21386e28056cba&amp;authority=https://ua_powershell:32844/Topology/topology.svc  "
    
  5. 必须将新的服务应用程序连接与本地 Web 应用程序关联。 有关如何执行此操作的信息,请参阅在 SharePoint Server 中添加或删除 Web 应用程序的服务应用程序连接

另请参阅

其他资源

New-SPBusinessDataCatalogServiceApplicationProxy

New-SPEnterpriseSearchServiceApplicationProxy

New-SPMetadataServiceApplicationProxy

New-SPProfileServiceApplicationProxy

New-SPSecureStoreServiceApplicationProxy