azure-storage

Is it possible to read File from same folder where Azure function exists

六月ゝ 毕业季﹏ 提交于 2021-02-06 01:35:52
问题 In my Azure C# function I need to read a .txt file. I make the .txt file in Visual studio and set it to "copy Always". Now I am using this code to read the file var dir = System.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetEntryAssembly().Location); var path = System.IO.Path.Combine(dir, "twinkle.txt"); this code doesn't work. When I open the folder which is the value of dir. It lead me to this directory ""C:\Users{username}\AppData\Local\Azure.Functions.Cli\1.0.9"" How I can store

How to import a module in a Azure PowerShell Function?

不羁岁月 提交于 2021-02-05 11:55:37
问题 Im trying to query an azure table from a function ( using Get-AzTableRow ) . Works very well from my laptop but the module "aztable' is not present in the azure function, and therefore all i get is a red screen :( Is there a way to install it ? Thanks ! David 回答1: You do not need to install the AzTable module in the Azure Function yourself. When you run the command, it will install the corresponding module for you. Here are the screenshots: The example of the AzTable module: $location =

Simple PHP cURL file upload to Azure storage blob

让人想犯罪 __ 提交于 2021-02-04 14:17:27
问题 I have issues to create a new/simple PHP script/function with cURL to upload simple file (image.jpg) from local server to Azure storage - blob container using Shared Key authentication. I do not want (for other reasons) use SDK and/or multiple files/libraries. I need only one function - fileUpload - and that is it. Documentation does not provide complete example for upload (POST) with file overwrite. https://docs.microsoft.com/en-us/rest/api/storageservices/fileservices/authentication-for-the

Azure Storage FileShare with ASP.Net Core and Razor Page

走远了吗. 提交于 2021-01-29 09:28:48
问题 Beginner question I am using the latest ASP.NET Core SDK to build an MVC/Razor page to display user files. We have the files in Azure Storage FileShare. The difficulty I'm running into is getting the FILES to list out and there is very little documentation on how to do this out there. Once I finally get it figured out I would like to create a post on Medium or somewhere else to help any other beginners. The file structure of the File Share is as such: Azure File Share MainShare EmployeNumber

Recovery Services Vault - What does LRS vs GRS apply to in this context?

淺唱寂寞╮ 提交于 2021-01-29 09:26:05
问题 An Azure Recovery Services Vault has a "Backup Configuration" setting to control the "storage replication type" of the vault. There are 2 options: LRS or GRS storage. I need some guidance on what this means in the context of a vault. 1) What exactly does the LRS/GRS setting of a recovery services vault apply too when it comes to a vault? For example does it apply to the settings/configuration of the vault, does it apply to any backup data in the vault? 2) If the GRS setting applies to backup

Microsoft Azure Storage denying my OneClick application from downloading

依然范特西╮ 提交于 2021-01-29 06:09:58
问题 Through MAS, I have a blob container setup with public access level set to "Public read access for blobs only", allowing for a download of the setup.exe by visiting "https://myblob.blob.core.windows.net/myprogram/myprogram.htm". The problem stems from actually running setup.exe in that it gives me The following properties have been set: Property: [AdminUser] = true {boolean} Property: [InstallMode] = HomeSite {string} Property: [NTProductType] = 1 {int} Property: [ProcessorArchitecture] =

Getting issues while assigning reader role to storage account via ARM template

自闭症网瘾萝莉.ら 提交于 2021-01-28 14:12:28
问题 I am facing following error "The request to create role assignment 'c*****************5' is not valid. Role assignment scope '/subscriptions/c**********************5/resourceGroups/MyResourceGroup/providers/Microsoft.Storage/storageAccounts/mystorageaccountname' must match the scope specified on the URI" { "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "principalId": { "type": "string", "defaultValue":

Azure Storage emulator with Nodejs createQueueService error

南笙酒味 提交于 2021-01-28 09:31:07
问题 I'm receiving the following error when I try connecting to the emulated storage queue service: The MAC signature found in the HTTP request '...' is not the same as any computed signature. Make sure the value of Authorization header is formed correctly including the signature. This is the approach I'm using to connect to the azure storage: var storageAccount = 'devstoreaccount1' var accessKey= 'Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==' var azure

Azure Blob Error: StorageException: The condition specified using HTTP conditional header(s) is not met

假装没事ソ 提交于 2021-01-28 09:01:40
问题 So I have a function that simply downloads text from blob storage every 10 minutes and checks for a result. This function can run for days. But it often (roughly every day) fails before finishing with the following error. Caused by: com.microsoft.azure.storage.StorageException: The condition specified using HTTP conditional header(s) is not met. My code is pretty simple. public String downloadTextBlob(CloudBlobDirectory dir, String filename) { try { return dir.getBlockBlobReference(filename)

Azure Storage account firewall rules work for table but break blob storage

与世无争的帅哥 提交于 2021-01-28 08:37:00
问题 If I add a firewall rule on my Azure storage account that only allows access from my IP address, I can still successfully access the table and queue storage in that storage account, but when I try to access any of the blobs or file storage, I get an error. Using Microsoft Azure Storage Explorer, the error I see is 'Unable to retrieve child resources. This request is not authorized to perform this operation' It seems crazy that the firewall rule would work differently for blob and table