本文介绍了如何创建一个Windows服务ACS通过PowerShell的?服务器无法authneticate请求的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,我下载了蔚蓝的PowerShell的,因为我想创建一个服务总线命名空间附加ACS通过PowerShell的,而这显然不能被通过用户界面做了

通过ACS服务总线认证通过同伴-sbACS命名空间管理。如果你想为一个服务总线命名空间中创建一个同伴ACS命名空间,使用New-AzureSBNamespace PowerShell命令创建服务总线命名空间。例如:
Windows PowerShell中

 新AzureSBNamespace< namespaceName> < GT地区;

例如,如果你创建一个服务总线命名空间称为contoso.servicebus.windows.net,叫contoso-sb.accesscontrol.windows.net同伴ACS命名空间自动部署。对于已经2014年8月之前创建的所有命名空间,伴随ACS命名空间创建的。

所以,我所做的是:

  GET-AzurePublishSettingsFile

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

 进口AzurePublishSettingsFile -PublishSettingsFileC:\\用户\\ valencil \\谷歌驱动器\\工具\\即付即用即付 -  2014年9月5日,credentials.publishsettings

进口剪掉抛出任何错误,但是当我尝试:

 新AzureSBNamespacelevalencia西欧

我得到这个错误:

 新AzureSBNamespace:ForbiddenError:服务器无法验证请求。验证证书是有效的,并与此有关
订阅。
在行:1字符:1
+新AzureSBNamespacelevalencia西欧
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo:CloseError:(:) [新-AzureSBNamespace] CloudException
    + FullyQualifiedErrorId:Microsoft.WindowsAzure.Commands.ServiceBus.NewAzureSBNamespaceCommand


解决方案

您需要设置/选择订阅您发出新azuresbnamespace命令。

选择-AzureSubscription -SubscriptionName

So, I downloaded the azure powershell because I wanted to create a service bus namespace with an attached ACS by powershell, something that apparently cant be done anymore via the UI.

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

Service Bus authentication through ACS is managed through a companion "-sb" ACS namespace. If you want a companion ACS namespace to be created for a Service Bus namespace, create your Service Bus namespace using the New-AzureSBNamespace PowerShell cmdlet. For example:Windows PowerShell

New-AzureSBNamespace <namespaceName> "<Region>"

For example, if you create a Service Bus namespace called contoso.servicebus.windows.net, a companion ACS namespace called contoso-sb.accesscontrol.windows.net is provisioned automatically. For all namespaces that were created before August 2014, an accompanying ACS namespace was created.

So, what I did is:

Get-AzurePublishSettingsFile

This made me download a file and then I used:

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

The import didnt throw any error, however when I tried:

New-AzureSBNamespace "levalencia" "West-Europe"

I got this error:

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
解决方案

You need to set/select the subscription before you issue the new-azuresbnamespace command.

Select-AzureSubscription -SubscriptionName

这篇关于如何创建一个Windows服务ACS通过PowerShell的?服务器无法authneticate请求的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-14 06:22