Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8032501
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T01:24:26+00:00 2026-06-05T01:24:26+00:00

I get DataServiceRequestException exception when I try to save an entity to azure table.

  • 0

I get DataServiceRequestException exception when I try to save an entity to azure table. It happens at this line _myContext.SaveChangesWithRetries(); I’ve tried to google to see what the problem could be. But could not find any answer to it.

Anyone kow what the problem could be?

Storage creator

public CloudTableClient GetMusicClient() {
      //retrieve connection string from settings
      CloudStorageAccount storageAccount = CloudStorageAccount.Parse(
          RoleEnvironment.GetConfigurationSettingValue("StorageConnectionString"));

      //create table client
      CloudTableClient tableClient = storageAccount.CreateCloudTableClient();

      //create table if doesn't exist
      string tableName = "music";
      tableClient.CreateTableIfNotExist(tableName);

      return tableClient;
}

WebAPI

public Music PostMusic(string genre, string artist, string random)
{
    CloudTableClient _myTableClient = _myTableRepo.GetMusicClient();
    TableServiceContext _myContext =  _myTableClient.GetDataServiceContext();

    Music music = new Music(genre, artist);
    music.Score = "10";
    music.Year = "2012";
    music.Random = random;
    try
    {
        _myContext.AddObject(random, music);
        _myContext.SaveChangesWithRetries();
    }
    catch (StorageClientException e)
    { }
    catch (DataServiceRequestException e)
    {
        System.Diagnostics.Debug.WriteLine(e.StackTrace);
    }

    return music;

}

stacktrace

An error occurred while processing this request.
   at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.get_Result()
   at Microsoft.WindowsAzure.StorageClient.Tasks.Task`1.ExecuteAndWait()
   at MyWebAPI.Controllers.ValuesController.PostMusic(String genre, String artist, String random) in C:\MyWebAPI\MyWebAPI\Controllers\ValuesController.cs:line 61

Music.cs

public class Music : TableServiceEntity
    {
        public Music(string genre, string artist)
        {
            this.PartitionKey = genre;
            this.RowKey = artist;
        }
        public Music() {}
        public string Score { get; set; }
        public string Year { get; set; }
        public string Random { get; set; }
    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T01:24:27+00:00Added an answer on June 5, 2026 at 1:24 am

    Oh, it looks like your first argument to AddObject is wrong? It should be “music,” the name of your table, but if the parameter name is to be believed, it looks like you’re passing in a random string.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I get this exception: Exception in thread main java.lang.ArrayIndexOutOfBoundsException: 100 at Vindu.<init>(setevelger.java:64) at setevelger.main(setevelger.java:22)
i get this error: Traceback (most recent call last): File <stdin>, line 1, in
Get an empty HTML, type in this and see its source code on Google
I get this 'error' when running PEVerify on a custom generated assembly. [MD](0x8013124C): Error:
I get the memberOf property for my user using this code: DirectorySearcher search =
I get this error when trying ruby script/console Rails requires RubyGems >= . Please
Get location(lat/long) without GPS, just like my location feature in Google maps. I have
get current array position pointer while doing foreach $object->result_array() Hi, consider this, a case.
I get the following errors when I try to compile any Android RenderScript sample
I get this error while installing cmake on my machine. Error: Target org.macports.configure returned:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.