azure

Azure Resources Management API. Authorization issue when creating Service Bus Hybrid Connection

非 Y 不嫁゛ 提交于 2021-02-08 11:36:58
问题 We try to use Azure Resources Management API to create a Hybrid Connection. (https://docs.microsoft.com/en-us/rest/api/relay/hybridconnections.) The problem we have is that every time we submit HTTP request it returns us 401 error with message: { "error":{"code":"AuthenticationFailedInvalidHeader","message":"Authentication failed. The 'Authorization' header is provided in an invalid format."}} We prefer to use REST API rather than SDK/nugget packages Here is console app code: using System;

Azure Resources Management API. Authorization issue when creating Service Bus Hybrid Connection

偶尔善良 提交于 2021-02-08 11:35:49
问题 We try to use Azure Resources Management API to create a Hybrid Connection. (https://docs.microsoft.com/en-us/rest/api/relay/hybridconnections.) The problem we have is that every time we submit HTTP request it returns us 401 error with message: { "error":{"code":"AuthenticationFailedInvalidHeader","message":"Authentication failed. The 'Authorization' header is provided in an invalid format."}} We prefer to use REST API rather than SDK/nugget packages Here is console app code: using System;

How can I get active address space of tagged Azure VNets inside Terraform?

三世轮回 提交于 2021-02-08 11:15:27
问题 I would like to get with Terraform the active address space of VNets for Azure in Terraform that have a certain tag. For this I thought I could use Resource data source for virtual networks: data "azurerm_resources" "vnets"{ type = "Microsoft.Network/virtualNetworks" required_tags = { tag_name = "tag" } } Then I realized that required attribute "address_space" belongs actually to the Virtual Networks Data Source (https://www.terraform.io/docs/providers/azurerm/r/virtual_network.html). Still I

Azure App Services Deployment Slot Transformations

六月ゝ 毕业季﹏ 提交于 2021-02-08 10:55:54
问题 I would like to start using the deployment slots in my Azure App Services for a staging to production task. The problem that I am running into is I can't seem to find a way to do transformations on the web.config outside of the appsetting and connectionstrings. I seem to be missing something, but I need to be able to adjust other configurations, from logging levels, to other integrated config sections. We currently have been using direct deployments from our build server with msdeploy and

Unable to “Import Certificate” using API in PowerShell

邮差的信 提交于 2021-02-08 10:43:28
问题 I have a self signed certificate that I am trying to import to Azure Key Vault Certificate, and I am facing issues. I am not doing it using the Import-AzKeyVaultCertificate command, but using the API. I was successfully able to create a Key via the API route, but for the life of me, I am not able to Import a certificate. FYI, it also works when I do it over an Azure DevOps pipeline, so I know the Service Principle isn't the issue. Here's how I am creating the certificate (over PowerShell

Unable to “Import Certificate” using API in PowerShell

亡梦爱人 提交于 2021-02-08 10:42:25
问题 I have a self signed certificate that I am trying to import to Azure Key Vault Certificate, and I am facing issues. I am not doing it using the Import-AzKeyVaultCertificate command, but using the API. I was successfully able to create a Key via the API route, but for the life of me, I am not able to Import a certificate. FYI, it also works when I do it over an Azure DevOps pipeline, so I know the Service Principle isn't the issue. Here's how I am creating the certificate (over PowerShell

How can I get Azure AD Authentication from .Net Core program for Angular app

こ雲淡風輕ζ 提交于 2021-02-08 10:40:38
问题 I have a .Net Core 3.1 program that hosts an Angular 10 application. The Angular application has a login page where the user can enter a username and password which gets sent to a login function in .Net Core which returns an oAuth token that is used in all calls to the api from Angular. The token only gets returned once the username and password are checked against a database. I would like to have a "Sign in with Microsoft" button on the login form that the user could click instead of

Laravel 5.5 Error 405 (Method Not Allowed) XHR PUT METHOD now working on Azure Server

拈花ヽ惹草 提交于 2021-02-08 10:28:26
问题 I have installed Laravel 5.5 on Azure Web Server with PHP 7 installed. Other request methods working well except the XHR PUT METHOD. It returns an error message on the console: 405 (Method Not Allowed) and XHR network preview: The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used. I already allowed the PUT method on web.config files <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <urlCompression doDynamicCompression=

how to create folder in blob storage

有些话、适合烂在心里 提交于 2021-02-08 10:27:18
问题 I have a file such as Parent.zip and when unzipped, it will yield these files: child1.jpg , child2.txt , child3.pdf . When running Parent.zip through the function below, the files are correctly unzipped to: some-container/child1.jpg some-container/child2.txt some-container/child3.pdf How do I unzip the files to their parent folder? The desired result would be: some-container/Parent/child1.jpg some-container/Parent/child2.txt some-container/Parent/child3.pdf As you can see above the folder

Laravel 5.5 Error 405 (Method Not Allowed) XHR PUT METHOD now working on Azure Server

大兔子大兔子 提交于 2021-02-08 10:26:25
问题 I have installed Laravel 5.5 on Azure Web Server with PHP 7 installed. Other request methods working well except the XHR PUT METHOD. It returns an error message on the console: 405 (Method Not Allowed) and XHR network preview: The page you are looking for cannot be displayed because an invalid method (HTTP verb) is being used. I already allowed the PUT method on web.config files <?xml version="1.0" encoding="utf-8"?> <configuration> <system.webServer> <urlCompression doDynamicCompression=