azure

NLog with Application Insights - logging exceptions as an exception instead of a trace

允我心安 提交于 2021-02-10 11:44:26
问题 Currently I am using a .NET Core Web Application built using Service Stack. Logging is currently provided by using NLog, with Azure Application Insights as a target. Currently when I log messages and exceptions, I am coming across some weird behaviours: Log.Fatal("test not implemented exception", new NotImplementedException()); //this logs under Exceptions in Application Insights Log.Fatal(new NotImplementedException("test not implemented exception")); //this logs under Trace What I would

Getting list of NSG and corresponding Subnet or NIC

狂风中的少年 提交于 2021-02-10 11:43:30
问题 Thanks in advance. I'm working on Azure PowerShell Script which will get all the NSG and finds whether it is attached to NIC or Subnet and give the name of the same in CSV. I'm stuck in parsing the NSG as it has property SubnetsText which outputs the data in below format. I'm trying to parse it using substring method but it did not work. Anybody tried this before? [ { "TapConfigurations": [], "HostedWorkloads": [], "Id": "/subscriptions/xxxx-xxxx-xxx-xxx-xxxxxx/resourceGroups/vm-test-group

TelemetryClient produces inconsistent results in Application Insights

…衆ロ難τιáo~ 提交于 2021-02-10 10:54:47
问题 I tried tracking custom metrics with and without flushing it. However, the metrics only intermittently shows up in Application Insights under the "Custom" section. First question: Is it required to run "flush()" after every single "TrackMetric(metric)" call in order for the telemetry to be sent to Application Insights? Second: Why is there this intermittent behavior? I'm only writing one metric at a time, so it's not as if I'm overloading Application Insights with thousands of separate calls.

Django channels and azure

柔情痞子 提交于 2021-02-10 07:33:42
问题 I am trying to deploy django channels in azure. I have already integrated it with azure redis cache and it's working good in local host. I have tried the normal deployment of django apps in azure, everything except sockets are working. CHANNEL_LAYERS = { 'default': { 'BACKEND': 'channels_redis.core.RedisChannelLayer', 'CONFIG': { "hosts": [(f'redis://:{os.environ["REDISPASS"]}@mywebsite.redis.cache.windows.net:6379/0')], }, }, } It's showing unexpected error website closed unexpectedly. I

How to roll out latest .net framework on Azure VM?

▼魔方 西西 提交于 2021-02-10 07:13:04
问题 I created a Azure VM (windows sever 2016) using azure portal. It has .net 4.6.2 installed on it. Now I want to roll out latest available .net framework (4.7/ 4.7.1) on it. One option is to download required framework and install it on the VM. I am sure there should be some other better way to roll out .net framework on Azure VMs using Azure portal or ARM template. Please help me with the option available for the same. 回答1: Like the other answer says, you could use Azure Powershell DSC

How to roll out latest .net framework on Azure VM?

匆匆过客 提交于 2021-02-10 07:04:22
问题 I created a Azure VM (windows sever 2016) using azure portal. It has .net 4.6.2 installed on it. Now I want to roll out latest available .net framework (4.7/ 4.7.1) on it. One option is to download required framework and install it on the VM. I am sure there should be some other better way to roll out .net framework on Azure VMs using Azure portal or ARM template. Please help me with the option available for the same. 回答1: Like the other answer says, you could use Azure Powershell DSC

How to add extra files to the package that is generated by msbuild called by an Azure Resource Group Project in Visual Studio

无人久伴 提交于 2021-02-10 06:46:44
问题 So I have a solution made up of a web project and an Azure Resource Group project much like what is described here: https://blogs.technet.microsoft.com/georgewallace/2015/05/10/deploying-a-website-with-content-through-visual-studio-with-resource-groups/ The issue I am having is that the web project needs to include some EXTRA files in its bin directory in order to function. Now through the normal package process on the web project itself I accomplish this by adding a custom target and hook

How to add extra files to the package that is generated by msbuild called by an Azure Resource Group Project in Visual Studio

帅比萌擦擦* 提交于 2021-02-10 06:46:04
问题 So I have a solution made up of a web project and an Azure Resource Group project much like what is described here: https://blogs.technet.microsoft.com/georgewallace/2015/05/10/deploying-a-website-with-content-through-visual-studio-with-resource-groups/ The issue I am having is that the web project needs to include some EXTRA files in its bin directory in order to function. Now through the normal package process on the web project itself I accomplish this by adding a custom target and hook

How to fix warning: “Application evaluated unhealthy due to redirection.” on Azure Health Check Feature

£可爱£侵袭症+ 提交于 2021-02-10 06:43:07
问题 I ran "Diagnose and solve problems" on Azure dashboard inside one of the app services, and then I got this critical risk alert: "Application evaluated unhealthy due to redirection.". Recommended actions is: If the application has HTTP to HTTPS redirectoin, consider one of the following solutions. a. Enable 'HTTPs Only' from the TLS/SSL settings blade for the respective App Service. This will force health check pings to over 443. b. Modify the Application logic/ad a URL Rewrite rule so that

How can I include additional files in an Azure cloud services package when using VSTS?

ε祈祈猫儿з 提交于 2021-02-10 06:28:15
问题 I have a solution with a web project in it and a cloud project for deploying that web project as a cspkg file to a cloud service. This all works fine. However, I have a file that i don't want in the web project but I do want deployed with the cspkg file into the cloud service. We use VSTS to build and deploy things, and I haven't figured out how to include extra files in the package within this system. I tried a Copy Files step but that doesn't get the file into the package, it does get it