powershell - 如何通过 powershell 创建 Windows 服务 ACS?服务器无法验证请求

标签 powershell azure servicebus

因此,我下载了 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

最佳答案

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

选择-Azure订阅-订阅名称

关于powershell - 如何通过 powershell 创建 Windows 服务 ACS?服务器无法验证请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25684696/

相关文章:

powershell - Powershell中是否可以查询对象的属性页详细信息

unit-testing - 使用 Pester 测试 PowerShell 脚本时如何模拟输出文件?

powershell - 如何在第一次匹配时停止管道过滤(Where-Object)

.net - Azure 开发运营 : Make Nuget-Package with AssemblyVersion

php - Azure 上的 SimplePie 不解析 https feed

wcf - Windows 服务总线 1.0、Appfabric、Netmessaging 绑定(bind)失败

PowerShell SFTP 上传到特定端口号

azure - 从其他虚拟机检查 kubernetes pod 名称

azure - 本地 NServicebus 应用程序从 Azure ServiceBus 队列接收消息

c# - Azure 服务总线 SubscriptionClient 高延迟/无法同时接收消息