azure-storage

Execute Methode in windows azure with multiple instances

天涯浪子 提交于 2019-12-13 05:49:50
问题 I want to execute a job scheduler methods in my windows azure application. So in my application i am using 2 instance of the same application. So If i create a scheduler means both the instance can execute same code. Is it possible to avoid such execution? Or is it possible check other instace before executing the code? For the implementation i am using c#.Net. 回答1: The most common pattern is a self-electing controller. In this pattern, when these processes start, they attempt to create an

DataServiceRequestException with TableStorageSessionStateProvider

耗尽温柔 提交于 2019-12-13 05:47:19
问题 I'm trying to use the TableStorageSessionStateProvider from the Azure training kit. I can use the example without problems but when I use it in my web app, I get this exception: System.Data.Services.Client.DataServiceRequestException occurred Message=An error occurred while processing this request. Source=Microsoft.WindowsAzure.StorageClient StackTrace: at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result() at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait() at

Azure CloudBlob SetMetadata fails with “The metadata specified is invalid. It has characters that are not permitted.”

喜你入骨 提交于 2019-12-13 05:18:21
问题 I'm pretty sure this is a limitation of the Windows Azure SDK (Using the latest, 1.4), but there has got to be a way around this without using manual REST... The code: CloudBlob blob = container.GetBlobReference(url); // works blob.UploadByteArray(bytes); // works blob.Metadata["test"] = "public, max-age=259200"; // works // FAILS with "The metadata specified is invalid. It has characters that are not permitted." blob.Metadata["x-ms-blob-cache-control"] = "public, max-age=259200"; blob

Azure - Alternative method to slow Windows Azure Caching for multi instances

流过昼夜 提交于 2019-12-13 04:46:16
问题 We current move our existing web application to Azure. Azure Caching is very slow. Is there any alternative caching mechanism (better than Azure Caching) for multi instances in Azure? For example, storing caching in Azure Storage or Azure SQL. Thank you for your input! Added public class AzureCacheService : ICacheService { readonly DataCacheFactory _factory = new DataCacheFactory(); private readonly DataCache _cache; public AzureCacheService() { _cache = _factory.GetDefaultCache(); } public

Set metadata in REST request to put blob in AZURE

大憨熊 提交于 2019-12-13 04:05:56
问题 i am able to upload file to azure blob using REST api provided by Azure. i want to set metadata at the time i am doing request for put blob, when i am setting it into header as shown here i am unble to upload file and getting following exception org.apache.http.client.ClientProtocolException . from the last line of the code below HttpPut req = new HttpPut(uri); req.setHeader("x-ms-blob-type", blobType); req.setHeader("x-ms-date", date); req.setHeader("x-ms-version", storageServiceVersion);

Trouble Upgrading from Azure Storage 1.7 to 2.0

佐手、 提交于 2019-12-13 04:01:46
问题 I am currently involved in upgrading from Azure 1.7 to 2.2 and am encountering breaking changes with Storage. All the storage calls in the libraries are covered by Unit Tests and I've ironed out most of the changes. I am completely stuck on one of our core methods which gets a list of subdirectories in a directory. I know they are not actual directories, but parts of blob names, but the functionality existed before 2.0 and we make heavy use of it across nearly 30 different services. The

Azure Blob Storage Java SDK: Why isn't asynchronous working?

岁酱吖の 提交于 2019-12-13 03:49:57
问题 I am still spinning up on the Azure Storage Java SDK 10 and its use of reactive programming the paradigm. I wrote the following method to asynchronously download a blob to a byte stream as fast as possible. When I use the synchronous version (below), it works properly. When I comment out the blockingAwait() and uncomment the subscribe, the write and the doOnComplete never are executed... Basically, the run just falls out of the bottom of the method back to the caller. I am sure that I have

Upload file to Windows Azure with only the link of the file is provided

百般思念 提交于 2019-12-13 03:39:24
问题 How can I upload a file in azure if I only have the URL of the file to upload. In this case, i 'm using Dropbox file chooser which selects file from dropbox and returns its url path. eq https://www.dropbox.com/s/o9myet72y19iaan/Getting%20Started.pdf Now we need the file to be stored in Windows Azure blob. What is the easiest way to do this without downloading the file first. I'm planning to use a asp.net web api for the uploading of file to azure blob. 回答1: At first, I thought it should be

Get notification when file added to File Share

依然范特西╮ 提交于 2019-12-13 02:51:36
问题 Is there a way to get notified when a new file is added/modified to Azure File Share? Similar feature exists with AWS S3 where one can configure an S3 bucket to send message to SQS or SNS or Lambda (or other) when a new File is added. An alternative (though less preferred) is to be able to query files in a share such that only modified/new files after date X will be returned. 回答1: For getting notifications on addition/modification of blobs (not files), you have multiple options available:

SharedKeyCredential is not a constructor. Azure-storage react app

穿精又带淫゛_ 提交于 2019-12-13 02:50:55
问题 I'm trying to use the following code to upload a blockblob to Azure-Storage in a react app. However, I'm getting the following error. TypeError: SharedKeyCredential is not a constructor Any ideas? @azure/storage-blob@10.3.0 import React from 'react'; const { Aborter, BlobURL, BlockBlobURL, ContainerURL, ServiceURL, StorageURL, SharedKeyCredential, AnonymousCredential, TokenCredential } = require("@azure/storage-blob"); // Change to "@azure/storage-blob" in your package function App() { return