在 Microsoft.WindowsAzure.Management.WebSites 的NuGet包说,它
Description of the Microsoft.WindowsAzure.Management.WebSites NuGet package says that it
的提供管理功能为微软Azure网站,部署,配置,调试和比例您的网站的
"Provides management capabilities for Microsoft Azure Web Sites. Deploy, configure, debug, and scale your websites"
我应该使用什么类和方法来进行缩放操作?
What class and methods should I use to perform a scaling operation?
在这个话题我的previous问题被标记为复制,但我不同意,这里是一个解释: Scale与Azure管理库Azure的Web应用程序的.NET
My previous question on this topic was marked as duplicated, but I don't agree, here is an explanation: Scale Azure web app with Azure Management Libraries for .NET
试试这个伪code。你需要改变配置从反应到更新的模式。
Try this PSEUDO code. You'll need to transform config from Response to Update model.
var config = client.WebSites.GetConfiguration(webspace, website);
config.NumberOfWorkers = targetScaleSize;
var result = client.WebSites.UpdateConfiguration(webspace, website, config);