Looking at the document https://azure.microsoft.com/en-us/documentation/articles/cache-how-to-scale/, I found that you could use code to configure Redis, so it was interesting to try it out.
Download the demo instance via Https://github.com/rustd/RedisSamples/tree/master/ManageCacheUsingMAML and refer to https:// Msdn.microsoft.com/en-us/library/azure/dn790557.aspx#bk_portal the ad-related configuration and discovers that it is connected to global Azure by default at the time of authentication:
Well, this is a common problem with the China Azure, only to find the local configuration, to see the redismanagementclient , found that includes the BaseURI constructor, it should be:
But do not know the Redis service in China Azure, its baseuri is how much, the official website also does not have the relevant description, how to do? Call the PowerShell command Get-azurerediscache and use the Fiddler capture package to view:
Yes, the baseuri of China Azure Redis should be https://management.chinacloudapi.cn/, so the authentication client should read:
Redismanagementclient client = new Redismanagementclient (creds, new Uri ("https://management.chinacloudapi.cn/")) ;
And the document is using the default AD account:
So I'm going to have a different account, create a new ad account and try it.
[Redis] Configure Redis through code