我正在尝试使用Azure应用服务环境(ASE),并且我在使用Powershell在ASE中创建应用服务计划(ASP)时遇到了困难.我试图使用New-AzureResource
和New-AzureResourceGroupDeployment
cmdlet 这样做,并且都以无益的方式失败.我需要能够以编程方式为我们的CI配置和部署过程创建这些(使用TeamCity).
我手动创建了ASE,因为它们需要3个多小时才能启动(旁注:为什么,Microsoft,为什么用ASE做任何事情要花费3个多小时?),并将工作池1定义为双节点P1池.
然后通过明智地使用http://resources.azure.com工具,我能够提取定义ASP的属性.
然后我为新ASP创建了一个简单的模板:
{
"$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"resources": [
{
"apiVersion": "2015-06-01",
"name": "rg-ase-dev-asp-wp1-2",
"type": "Microsoft.Web/serverfarms",
"location": "East US",
"properties": {
"name": "rg-ase-dev-asp-wp1-2",
"sku": "Premium",
"workerSize": 0,
"numberOfWorkers": "1",
"hostingEnvironmentId": "[resourceId('Microsoft.Web/hostingEnvironments',parameters('rg-ase-dev'))]"
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
然后使用模板:
reResourceGroup1\Templates> New-AzureResourceGroupDeployment -ResourceGroupName
"rg-ase-dev" -TemplateFile .\ase_asp_only.json -Verbose
VERBOSE: 12:37:28 PM - Template is valid.
VERBOSE: 12:37:29 PM - Create template deployment 'ase_asp_only'.
VERBOSE: 12:37:36 PM - Resource Microsoft.Web/serverfarms
'rg-ase-dev-asp-wp1-2' provisioning status is running
Run Code Online (Sandbox Code Playgroud)
此命令将连续失败(即它将在预览门户中生成部署失败通知)几个小时,直到我想,它会被Azure后端杀死.
我已经尝试了模板的ASP属性值的大多数组合,但没有工作.我也尝试在同一个模板中创建一个ASP和一个依赖的WebApp,认为既然ASP只有在他们绑定了webapp的情况下才能存在,那就是我的问题.那太失败了. …
azure azure-web-sites azure-resource-manager azure-app-service-envrmnt
据我了解,ARR 关联 cookie 将客户端请求与特定服务器配对。如果启用,则请求将始终仅发送到与 Affinity cookie 绑定的服务器。Azure Web Apps 作为一个无状态平台,这并不总是有用,因为它不利用 Azure 应用服务中的横向扩展功能。
我的问题是在什么情况下我们应该或不应该启用 ARR 关联 cookie?
作为 PaaS 环境,我知道作为最终用户我们对平台没有太多控制权,但是当我尝试查看 Azure Application Insights 中的数据时,我可以看到正在生成实例当前运行的不同云角色名称。只是想知道应用程序请求路由和负载平衡在应用程序服务环境的后端是如何发生的。
谢谢。
arr azure-application-insights azure-app-service-envrmnt azure-web-app-service azure-appservice
我正在开发一个多层Web应用程序,该应用程序由Azure App Service Environment中的多个Web API组成.
最近在升级到VS2017之后,我注意到在我发布新代码(来自VS)之后,应用程序将随机无法更新.远程调试器无法正确加载,旧代码将在发布后继续运行.
我在发布设置中选择"删除目的地的其他文件".
重新启动应用程序通常会暂时解决问题,但有时我必须停止并重新启动每个应用程序.
VS或Azure中是否有任何可能影响此行为的新设置,或者是否无法正常工作?
我正在通过 terraform 创建 azure 应用程序服务,并遵循此站点上的文档:https : //www.terraform.io/docs/providers/azurerm/r/app_service.html
这是 terraform 脚本的片段:
resource "azurerm_app_service" "app" {
name = "app-name"
location = "${azurerm_resource_group.test.location}"
resource_group_name = "${azurerm_resource_group.test.name}"
app_service_plan_id = "ommitted"
site_config {
java_version = "1.8"
java_container = "TOMCAT"
java_container_version = "8.5"
}
}
Run Code Online (Sandbox Code Playgroud)
我的应用服务也需要子域,但我无法在 terraform 中找到任何帮助:
截至目前,应用服务的网址为:https : //abc.azure-custom-domain.cloud
我希望我的网址是:https://*.abc.azure-custom-domain.cloud
我知道这可以通过门户完成,但他们有什么方法可以通过 terraform 做到这一点吗?
我一直在尝试使用 ASP.NET Core 2.0 应用程序设置 Application Insights。在本地运行我的应用程序时,日志按预期显示在 Application Insights 中。但是,当部署到 Azure 应用服务时,在将日志发送到 Application Insights 中的“请求”表时,“异常”或“跟踪”中不会显示任何日志。
似乎解决此问题的唯一方法是将以下代码行添加到 Startup.Configure():
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Information);
Run Code Online (Sandbox Code Playgroud)
上面的解决方案是不可取的,因为我们希望根据环境配置不同的日志级别,因此首选基于配置的解决方案。另外,我的猜测是问题与配置有关,因为它在本地工作正常。Azure 中没有进行任何特殊配置。
这是整个 Startup.Configure():
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
if (env.IsDevelopment())
{
app.UseDeveloperExceptionPage();
}
app.UseMvc();
loggerFactory.AddApplicationInsights(app.ApplicationServices, LogLevel.Information);
}
Run Code Online (Sandbox Code Playgroud)
我的 Program.cs 如下:
namespace TestLoggingApplication
{
public class Program
{
public static void Main(string[] args)
{
BuildWebHost(args).Run();
}
public static IWebHost BuildWebHost(string[] args) =>
WebHost.CreateDefaultBuilder(args)
.UseApplicationInsights()
.UseStartup<Startup>()
.Build();
}
}
Run Code Online (Sandbox Code Playgroud)
应用程序的 appsettings.json 文件如下(InstrumentationKey 替换为隐私):
{
"Logging": {
"IncludeScopes": false, …
Run Code Online (Sandbox Code Playgroud) c# azure-application-insights .net-core azure-app-service-envrmnt asp.net-core
我最近将我的 ASP .Net Core 2.2 Web API 升级到了 .Net Core 3.0。现在,当我从 Visual Studio 2019 社区(安装了最新更新)中发布到 Azure 应用服务时,我收到以下消息:
在 propworx-api-san 上启动 PropWorx.API 时出现问题。您的应用程序需要 .NET Core 3.0.0 运行时,但 Microsoft Azure 应用服务仅支持以下版本:2.1.12、2.1.13、2.2.6、2.2.7 和 3.0.0。
然而,该 API 在部署后似乎可以正常工作。这是我应该关心的事情吗?
deployment azure asp.net-web-api azure-app-service-envrmnt asp.net-core-3.0
我For_Each
在Azure Logic App中有一个循环,它调用另一个嵌套的Logic App.嵌套逻辑应用程序的每次迭代的结果是一个包含字符串数组的JSON对象,如下所示:
{
"Results": ["string a", "string b"]
}
Run Code Online (Sandbox Code Playgroud)
因此,父逻辑应用程序中的For_Each循环的输出如下所示:
[
{"Results": ["string a", "string b"]},
{"Results": ["string c", "string d"]}
]
Run Code Online (Sandbox Code Playgroud)
我想把所有这些字符串放到一个单独的平面列表中,我可以传递给另一个动作.
我怎样才能做到这一点?是否可以使用工作流定义语言和内置函数,还是需要使用外部函数(在服务或Azure函数中)?
我们的子网中有 1 个内部ASE。在同一网络的不同子网中,我们部署了一台虚拟机,充当Azure DevOps Agent Windows v2
我们可以从访问此虚拟网络的计算机手动部署 Web 应用程序(使用 Visual Studio),但无法从 Azure DevOps 进行部署。
这是我们所做的
13.107.6.183
和13.107.9.183
(检查所有端口)-allowUntrusted
我们在部署过程中遇到的错误是:
More Information: Could not connect to the remote computer ("{myapp}.scm.{customdomain}.com"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started. Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_DESTINATION_NOT_REACHABLE.
Error: Unable to connect to the remote server
Error: A connection attempt …
Run Code Online (Sandbox Code Playgroud) azure azure-deployment azure-app-service-envrmnt azure-devops
以下 az-cli 命令不支持 azure 应用服务上的自动缩放实例的指标。
# Create cpu autoscale rule
az monitor autoscale rule create --resource-group $COMMON_RESOURCE_GROUP_NAME \
--subscription $SUBSCRIPTION_ID \
--resource $WEBAPP_NAME \
--resource-type 'Microsoft.Web/sites' \
--autoscale-name "test" \
--condition "Percentage CPU > 75 avg 5m" \
--scale out 1
Run Code Online (Sandbox Code Playgroud)
响应 - 引发“Microsoft.WindowsAzure.Management.Monitoring.MonitoringServiceException”类型的异常。 [代码:“UnsupportedMetric”]
我遵循了此 Microsoft 文档 - https://learn.microsoft.com/en-us/cli/azure/monitor/autoscale/rule?view=azure-cli-latest
我知道如何通过天蓝色门户进行自动缩放,但我想使用脚本来执行此操作。
azure azure-automation azure-app-service-envrmnt azure-web-app-service