【问题标题】:How can I create a windows service ACS by powershell? The server failed to authneticate the request如何通过 powershell 创建 Windows 服务 ACS?服务器未能对请求进行身份验证
【发布时间】:2014-09-05 11:17:32
【问题描述】:

所以,我下载了 azure powershell,因为我想通过 powershell 创建一个带有附加 ACS 的服务总线命名空间,这显然不能再通过 UI 完成。

http://msdn.microsoft.com/en-us/library/azure/dn170478.aspx

通过 ACS 的服务总线身份验证通过伴随的“-sb”ACS 命名空间进行管理。如果要为服务总线命名空间创建配套 ACS 命名空间,请使用 New-AzureSBNamespace PowerShell cmdlet 创建服务总线命名空间。例如: Windows PowerShell

New-AzureSBNamespace <namespaceName> "<Region>”

例如,如果您创建名为 contoso.servicebus.windows.net 的服务总线命名空间,则会自动预配名为 contoso-sb.accesscontrol.windows.net 的配套 ACS 命名空间。对于 2014 年 8 月之前创建的所有命名空间,都会创建一个随附的 ACS 命名空间。

所以,我所做的是:

Get-AzurePublishSettingsFile

这让我下载了一个文件,然后我使用了:

Import-AzurePublishSettingsFile –PublishSettingsFile "C:\Users\valencil\Google Drive\Tools\Pay-As-You-Go-9-5-2014-credentials.publishsettings"  

导入没有抛出任何错误,但是当我尝试时:

New-AzureSBNamespace "levalencia" "West-Europe”

我收到了这个错误:

New-AzureSBNamespace : ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and is associated with this 
subscription.
At line:1 char:1
+ New-AzureSBNamespace "levalencia" "West-Europe”
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [New-AzureSBNamespace], CloudException
    + FullyQualifiedErrorId : Microsoft.WindowsAzure.Commands.ServiceBus.NewAzureSBNamespaceCommand

【问题讨论】:

    标签: powershell azure servicebus


    【解决方案1】:

    您需要在发出 new-azuresbnamespace 命令之前设置/选择订阅。

    选择-AzureSubscription -SubscriptionName

    【讨论】:

    猜你喜欢
    • 2020-01-29
    • 2016-04-04
    • 1970-01-01
    • 2014-09-19
    • 1970-01-01
    • 2016-11-18
    • 2017-03-03
    • 1970-01-01
    • 2012-02-10
    相关资源
    最近更新 更多