azure-storage

TableQuery<T> from Azure TableStorage that filters on PartitionKey

不问归期 提交于 2019-12-21 07:13:08
问题 I'm trying to abstract geting all entities from a Table by partitionKey, like so: public List<T> GetEntities<T>(string partitionKey, T entity) where T : TableEntity { try { var tableClient = _account.CreateCloudTableClient(); var table = tableClient.GetTableReference(entity.GetType().Name.ToLower()); var exQuery = new TableQuery<T>().Where(TableQuery.GenerateFilterCondition("PartitionKey", QueryComparisons.Equal, partitionKey)); var results = table.ExecuteQuery(exQuery).Select(ent => (T) ent)

Copy blob between storage accounts

混江龙づ霸主 提交于 2019-12-21 05:07:32
问题 I'm trying to copy a blob from one storage account to another (In a different location). I'm using the following code: var sourceContainer = sourceClient.GetContainerReference(containerId); var sourceBlob = sourceContainer.GetBlockBlobReference(blobId); if (await sourceBlob.ExistsAsync().ConfigureAwait(false)) { var targetContainer = targetClient.GetContainerReference(containerId); await targetContainer.CreateIfNotExistsAsync().ConfigureAwait(false); var targetBlob = targetContainer

Do HTTP RANGE headers work with Azure Blob Storage Shared Access Signatures?

狂风中的少年 提交于 2019-12-21 04:26:37
问题 I'm using Azure Blob Storage to store media files and providing access to these files using Shared Access Signatures; everything is working well in this regard. However, I have a client application that needs to "resume" access to these files and does so using an HTTP RANGE header. When it makes a request like this, it is unhappy with the result it gets back from Azure. I'm not sure how to view the details on the Azure side to see if the request failed, or if it just returned something the

What is the azure table storage query equivalent of T-sql's LIKE command?

て烟熏妆下的殇ゞ 提交于 2019-12-21 03:13:21
问题 I'm querying Azure table storage using the Azure Storage Explorer. I want to find all messages that contain the given text, like this in T-SQL: message like '%SysFn%' Executing the T-SQL gives "An error occurred while processing this request" What is the equivalent of this query in Azure? 回答1: There's no direct equivalent, as there is no wildcard searching. All supported operations are listed here. You'll see eq, gt, ge, lt, le, etc. You could make use of these, perhaps, to look for specific

What is the azure table storage query equivalent of T-sql's LIKE command?

可紊 提交于 2019-12-21 03:13:17
问题 I'm querying Azure table storage using the Azure Storage Explorer. I want to find all messages that contain the given text, like this in T-SQL: message like '%SysFn%' Executing the T-SQL gives "An error occurred while processing this request" What is the equivalent of this query in Azure? 回答1: There's no direct equivalent, as there is no wildcard searching. All supported operations are listed here. You'll see eq, gt, ge, lt, le, etc. You could make use of these, perhaps, to look for specific

Azure Tables: best practices for choosing partition/row keys

旧城冷巷雨未停 提交于 2019-12-20 10:17:19
问题 What would be best practices for choosing partition/row keys for entities in Azure Tables? The common advice is to magically balance between partition size and number of partitions. But no one seems to have a good definition of how it can be accomplished in 3 easy steps. Is there a general approach for choosing keys so that everything then just works? 回答1: There is a detailed article on this very subject up on MSDN: Designing a scalable partitioning strategy for Windows Azure Storage. 回答2: I

How do I upload some file into Azure blob storage without writing my own program?

一个人想着一个人 提交于 2019-12-20 09:26:25
问题 I created an Azure Storage account. I have a 400 megabytes .zip file that I want to put into blob storage for later use. How can I do that without writing code? Is there some interface for that? 回答1: Free tools: Visual Studio 2010 -- install Azure tools and you can find the blobs in the Server Explorer Cloud Berry Lab's CloudBerry Explorer for Azure Blob Storage ClumpsyLeaf CloudXplorer Azure Storage Explorer from CodePlex (try version 4 beta) There was an old program called Azure Blob

Microsoft Azure Storage vs. Azure SQL Database

霸气de小男生 提交于 2019-12-20 09:23:06
问题 I saw that there was a similar question asked several months back, but it really didn't address my situation well. Here it goes... I'm in the process of building from scratch a web-based, .NET application that has the potential to become a high-volume site (several hundred thousand page views a month to start) and am strongly considering using Microsoft Azure to host it. I have not built anything yet and am still researching my different options. The application itself is, at its core, a

Error when try to save in Windows Azure Table

别说谁变了你拦得住时间么 提交于 2019-12-20 07:43:11
问题 I did a method which add a user in storage. Below is the code and the error that I'm getting. public string addusr(string nome, string cidade, string cpf, string email, string telefone) { try { if (nome.Length == 0) return "f:Preencha o campo nome."; if (cidade.Length == 0) return "f:Preencha o campo cidade."; if (cpf.Length == 0) return "f:Preencha o campo cpf."; if (!Valida(cpf)) return "f:CPF Invalido."; if (email.Length == 0) return "f:Preencha o campo email."; Regex rg = new Regex(@"^[A

Azure diagnostics and WadLogsTable

拥有回忆 提交于 2019-12-20 05:59:31
问题 I deployed an application on Windows Azure, i activated the diagnostic monitor like follows : public override bool OnStart() { CloudStorageAccount account = CloudStorageAccount.Parse("DefaultEndpointsProtocol=https;AccountName=[xxxxxx];AccountKey=[xxxxxxx]"); var config = DiagnosticMonitor.GetDefaultInitialConfiguration(); config.Logs.ScheduledTransferLogLevelFilter = LogLevel.Information; config.Logs.ScheduledTransferPeriod = TimeSpan.FromMinutes(1D); DiagnosticMonitor.Start(account, config)