规模使用.NET SDK Azure的Web应用程序 [英] Scale Azure WebApp using .NET SDK

查看:246
本文介绍了规模使用.NET SDK Azure的Web应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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问题被标记为复制,但我不同​​意,这里是一个解释: <一href="http://stackoverflow.com/questions/29729496/scale-azure-web-app-with-azure-management-libraries-for-net#comments-29729496">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);

这篇关于规模使用.NET SDK Azure的Web应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆