Azure WASABi SecurityNegotiationException

微笑、不失礼 提交于 2020-01-05 07:31:10

问题


I'm running into this exception using Azure auto-scaling WASABi.

Could not retrieve the instance count for hosted service with DNS prefix 'DNS Prefix'. Microsoft.Practices.EnterpriseLibrary.WindowsAzure.Autoscaling.ServiceManagement.ServiceManagementClientException: The service configuration could not be retrieved from Windows Azure for hosted service with DNS prefix 'DNS Prefix' in subscription id 'Subscription ID' and deployment slot 'Staging'.

System.ServiceModel.Security.SecurityNegotiationException: Could not establish secure channel for SSL/TLS with authority 'management.core.windows.net'. ---> System.Net.WebException: The request was aborted: Could not create SSL/TLS secure channel. at System.Net.HttpWebRequest.GetResponse() at System.ServiceModel.Channels.HttpChannelFactory.HttpRequestChannel.HttpChannelRequest.WaitForReply(TimeSpan timeout) --- End of inner exception stack trace ---

I have set my service configuration as follow:

<?xml version="1.0" encoding="utf-8" ?>
<serviceModel xmlns="http://schemas.microsoft.com/practices/2011/entlib/autoscaling/serviceModel">
  <subscriptions>
    <subscription name="3-Month Free Trial"
                  certificateThumbprint="<Thumbprint>"
                  subscriptionId="<Subscription ID>"
                  certificateStoreLocation="LocalMachine" certificateStoreName="My">
      <services>
        <service dnsPrefix="<DNS Prefix>" slot="Staging">
          <roles>
            <role alias="<Role Name>" roleName="<Role Name>" wadStorageAccountName="wad-control-container"/>
          </roles>
        </service>
      </services>
      <storageAccounts>
        <storageAccount alias="wad-control-container"
                        connectionString="DefaultEndpointsProtocol=https;AccountName=<Account Name>;AccountKey=<Account Key>">
        </storageAccount>
      </storageAccounts>
    </subscription>
  </subscriptions>
  <stabilizer scaleUpCooldown="00:01:00"
            scaleDownCooldown="00:01:00"
            scaleUpOnlyInFirstMinutesOfHour="0"
            scaleDownOnlyInLastMinutesOfHour="0" />
</serviceModel>

To add on, the auto-scaling role is a single Worker Role. The deployment is having 2 Web Role for the website and this auto-scaling Worker Role together.

The web role is using the same certificate and is working fine, could anyone shed some light on what I can look into to solve this issue?

Thanks and Cheers.


回答1:


I got it to work.

  1. Create a new certificate
  2. Upload to the Subscription - Certificate
  3. Upload to Settings - Management Certificate
  4. Add certificate thumbprint to both web and worker roles in VS Studio
  5. Set certificateStoreLocation to CurrentUser in service xml and service definition
  6. Redeploy

Hope this help anyone who had this issue.

Cheers.



来源:https://stackoverflow.com/questions/12177333/azure-wasabi-securitynegotiationexception

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!