分享方式:


使用 AppFabric Cmdlet 來設定端點

此主題說明如何使用 AppFabric Cmdlet 來設定服務的端點。

注意

若要以手動方式執行 AppFabric Cmdlet,請開啟 AppFabric 的 Windows PowerShell 主控台,輸入適當的 Cmdlet,然後按下 ENTER。如需有關執行 Cmdlet 的詳細資訊,請參閱執行 AppFabric Cmdlet。如需有關此文件之語法陳述式中使用之任何類別或常用參數的詳細資訊,請參閱 AppFabric 的 Windows PowerShell 參考

設定服務的端點

在 AppFabric 的 Windows PowerShell 主控台中,執行 Set-ASAppServiceEndpoint Cmdlet 以修改端點。傳回的 ServiceEndpointInfo 代表已更新的端點組態。此操作只能讓您針對在本機 (指定的範圍) 設定的服務變更端點位址。

Set-ASAppServiceEndpoint Cmdlet 的語法選項:

語法 1

Set-ASAppServiceEndpoint -SiteName <string> -VirtualPath <string> –Address <string> -BindingName <string> -ContractName <string> -NewAddress <string>

語法 2

Set-ASAppServiceEndpoint -Uri <string> –Address <string> -BindingName <string> -ContractName <string> -NewAddress <string>

語法 3

Set-ASAppServiceEndpoint -ServiceObject <ServiceInfo> –Address <string> -BindingName <string> -ContractName <string> -NewAddress <string>
參數 描述

-SiteName (可省略)

指定網站名稱,該網站中包含您嘗試要設定其端點的服務。若指定此參數,則不能指定 -Uri 或 -ServiceObject。

-VirtualPath (可省略)

指定服務或應用程式 (您嘗試要設定其所含服務的端點) 的虛擬路徑 (例如,/MyDir1/MyApp1/POService.svc)。這個選擇性參數可在未指定 -Uri 或 -ServiceObject 時,與 -SiteName 搭配使用。

-Uri (可省略)

指定網站、應用程式或服務 (您嘗試要設定其端點) 的 URI。若指定此參數,則不能指定 -SiteName、-VirtualPath 或 -ServiceObject。

-ServiceObject (可省略)

指定 ServiceInfo 物件,供系統用來決定您嘗試要設定其端點的服務。若指定此參數,則不能指定 -SiteName、-VirtualPath 或 -Uri。此參數主要用於管道處理案例。如需詳細資訊,請參閱AppFabric 的 Windows PowerShell 參考

–Address <字串>

要修改之端點目前的位址。

-BindingName <字串>

要變更的端點繫結。

-ContractName <字串>

要變更的端點合約。

-NewAddress <字串>

端點的新位址。

設定端點的傳輸配額

在 AppFabric 的 Windows PowerShell 主控台中,執行 Set-ASAppServiceEndpointTransportQuota Cmdlet 以設定端點的傳輸配額。如果端點已有繫結組態且為本機端點,請利用指定的傳輸配額屬性來予以更新。

Set-ASAppServiceEndpointTransportQuota Cmdlet 的語法選項:

語法 1

Set-ASAppServiceEndpointTransportQuota -Address<string> -Binding<string> -Contract<string> [–ListenBacklog][–MaxBufferPoolSize][–MaxBufferSize][–MaxConnections][–MaxReceivedMessageSize]

語法 2

Set-ASAppServiceEndpointTransportQuota –ServiceEndpointObject <ServiceEndpointInfo> [–ListenBacklog][–MaxBufferPoolSize][–MaxBufferSize][–MaxConnections][–MaxReceivedMessageSize]

語法 3

Set-ASAppServiceEndpointTransportQuota -Address<string> -Binding<string> -Contract<string> -Use Defaults

語法 4

Set-ASAppServiceEndpointTransportQuota –ServiceEndpointObject <ServiceEndpointInfo> -Use Defaults
參數 描述

-Address<字串> -Binding<字串> -Contract<字串> (若未使用 ServiceEndpointObject,則需要這些參數)

指定端點的位址、繫結與合約。

-ServiceEndpointObject <服務端點資訊> (若未使用 Address、Binding 與 Contract,則需要這些參數)

請參閱 AppFabric 的 Windows PowerShell 參考

-Use Defaults

使用 -ListenBacklog、-MaxBufferPoolSize、-MaxBufferSize、-MaxConnections 與 -MaxReceivedMessageSize 的預設參數值。

-ListenBacklog、-MaxBufferPoolSize、–MaxBufferSize、–MaxConnections 與 -MaxReceivedMessageSize

如需傳輸配額組態、預設值、特定繫結使用哪個參數以及每個參數定義的詳細資訊,請參閱傳輸配額 (https://go.microsoft.com/fwlink/?LinkId=160232) (可能為英文網頁)。

如需有關此 Cmdlet 的詳細資訊,請參閱 Set-ASAppServiceEndpointTransportQuota。

  2012-03-05