azure-table-storage

How can I log errors and user actions in Windows Azure (MVC)?

醉酒当歌 提交于 2019-11-30 15:39:33
Azure is changing so quickly so could someone give me some suggestions on how could I could log: Errors Exceptions User Actions I would like to be able to log these to table storage so they can be retrieved with code and viewed on administrative web pages. I am not looking so much for code but what I really want is to know where I should look. Azure changes so fast I want to be sure to use what's best. Thank you I just did something similar on the weekend. I ended up just creating 1 table called "LogEvents" and used the provider key to separate the different types of log events and dates (e.g.

Error deleting from Azure Cloud Table - ResourceNotFound

和自甴很熟 提交于 2019-11-30 15:37:10
I'm having an intermittent problem deleting objects from an azure table. It only affects about 1% of my attempts, and if the same call is made again later then it works fine, but I'd love to find out the reason behind it! I've googled my fingers off and I've found the lack of documentation out there on how to create very reliable code for deleting, inserting and updating to be quite surprising ... it all seems to be a bit hit and miss, "try it, most of the time it will work" EDIT: I am deleting the text that was originally in this questions and replacing it with entirely new text to take into

Atomic operations in azure table storage

霸气de小男生 提交于 2019-11-30 07:55:50
问题 I am looking to implement a page view counter in azure table storage. If say two users visit the page at the same time, and the current value on PageViews = 100, is it guaranteed that the PageViews = 102 after the update operation? 回答1: The answer depends on how you implement your counter. :-) Table storage doesn't have an "increment" operator, so you'd need to read the current value (100) and update it to the new value (101). Table storage employs optimistic concurrency, so if you do what

Querying azure table storage for null values

匆匆过客 提交于 2019-11-30 07:52:15
问题 Does anyone know the proper way to query azure table storage for a null value. From what I've read, it's possible (although there is a bug which prevents it on development storage). However, I keep getting the following error when I do so on the live cloud storage: One of the request inputs is not valid. This is a dumbed down version of the LINQ query that I've put together. var query = from fooBar in fooBarSVC.CreateQuery<FooBar>("FooBars") where fooBar.PartitionKey == kPartitionID && fooBar

python querying all rows of azure table

☆樱花仙子☆ 提交于 2019-11-30 07:36:03
问题 I have around 20000 rows in my azure table . I wanted to query all the rows in the azure table . But due to certain azure limitation i am getting only 1000 rows. My code from azure.storage import TableService table_service = TableService(account_name='xxx', account_key='YYY') i=0 tasks=table_service.query_entities('ValidOutputTable',"PartitionKey eq 'tasksSeattle'") for task in tasks: i+=1 print task.RowKey,task.DomainUrl,task.Status print i I want to get all the rows from the

Azure Functions Table Binding: How do I update a row?

蹲街弑〆低调 提交于 2019-11-30 07:04:03
I am trying to update a row in an Azure table based on an Azure Function. I see that the Table bindings can handle an ICollector which has an Add method which will add a row. I also see that you use an IQueryable to read the data. How do you go about updating a specific row in the data? I saw in WebJobs something related to InsertOrReplace which is a method of TableOperations but I don't know if or how that comes into play and how to use it with Azure Functions. mathewc Following is one way you can do this. These steps will get easier with our next release, but for now you need to manually

Azure Table Storage RowKey restricted Character Patterns?

社会主义新天地 提交于 2019-11-30 02:49:56
Are there restricted character patterns within Azure TableStorage RowKeys? I've not been able to find any documented via numerous searches. However, I'm getting behavior that implies such in some performance testing. I've got some odd behavior with RowKeys consisting on random characters (the test driver does prevent the restricted characters (/ \ # ?) plus blocking single quotes from occurring in the RowKey). The result is I've got a RowKey that will insert fine into the table, but cannot be queried (the result is InvalidInput). For example: RowKey: 9}5O0J=5Z,4,D,{!IKPE,~M]%54+9G0ZQ&G34!G+

Could not load file or assembly Microsoft.Data.OData Version=5.2.0.0 error in Azure Cloud Worker Role using Table Storage

无人久伴 提交于 2019-11-29 20:54:11
I have a very peculiar issue using Azure Table Storage. I have a .NET 4.5 project in Visual Studio 2012 where I deal with all my Azure Table Storage functions. This project/dll is referenced by two other projects, my MVC website, and my Azure Worker Role. (I am running under the Azure Emulators on my machine, but it also happens when I deploy it to the cloud) I have the following function that is called when I save or retrieve a record: internal static CloudTable GetTable(CloudStorageAccount storageAccount, string tableReference) { CloudTableClient tableClient = storageAccount

Azure Storage Emulator error and does not start

人盡茶涼 提交于 2019-11-29 20:16:02
This error is really driving me crazy. (Terminal running in administrator mode) Initialization of azure storage emulator in sql server 2014: C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator>.\wastorage emulator init -server MY-PC Windows Azure Storage Emulator 3.0.0.0 command line tool The storage emulator was successfully initialized and is ready to use. Error when starting server: C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator>.\wastorage emulator start Windows Azure Storage Emulator 3.0.0.0 command line tool Unhandled Exception: System

How to get more than 1000 entities from an azure table storage query?

我的梦境 提交于 2019-11-29 12:10:59
I have read that azure table storage queries give maximum of 1000 entities and we have to make use of continuation tokens to fetch the next set of entities. I am just looking for an easy way to do that. All I want to do is fetch all the entities that the query should actually return and not just the 1000 entities. I have read @smarx post here and he mentions about ExecuteAll method in TableStorageDataServiceQuery but this seems to have deprecated as I cant find TableStorageDataServiceQuery in the storage client library. I also found this msdn documentation on how to handle the continuation