Answered TableServcieContext.SaveChanges() fails?

  • Wednesday, September 14, 2011 4:17 PM
     
     

    When I call this method after adding an object I get a DataServiceRequestException:

     An error occurred while processing this request., stack:    at System.Data.Services.Client.DataServiceContext.SaveResult.HandleBatchResponse()
       at System.Data.Services.Client.DataServiceContext.SaveResult.EndRequest()
       at System.Data.Services.Client.DataServiceContext.SaveChanges(SaveChangesOptions options)
       at WorkerRole1.DeviceServiceContext.AddDevice(Device d)

    The inner exception reads:
    <error xmlns=""http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"">
      <code>NotImplemented</code>
      <message xml:lang=""en-US"">The requested operation is not implemented on the specified resource.
    RequestId:11d4ef63-0ba2-4601-9e91-1667231149ac
    Time:2011-09-14T16:07:29.5797905Z</message>
    </error>",73af82c7a5d7433886304225e1350bce,WorkerRole1,WorkerRole1_IN_0,2696,2780,9/14/2011 4:10:07 PM,

    The table I'm writing to exists. My storage account seems fine.

    Any idea what causes the Not Implemented error?

All Replies

  • Thursday, September 15, 2011 2:01 PM
     
     Answered
    Turns out the SaveChanges() method was unhappy about one of the poperties on my entity object. Fixed and working but a more precise exception method would have been nice.
    • Marked As Answer by onnoweb Thursday, September 15, 2011 2:01 PM
    •  
  • Thursday, September 15, 2011 2:09 PM
    Moderator
     
     

    Hi onnoweb,

    I'm glad to hear that you resolve this issue.

    If you have any difficulty in future programming, we welcome you to post in forums again.

     

    Best Regards,

    Ming Xu.


    Please mark the replies as answers if they help or unmark if not.
    If you have any feedback about my replies, please contact msdnmg@microsoft.com.
    Microsoft One Code Framework
  • Wednesday, February 01, 2012 2:58 AM
     
     Proposed Answer

    I also encountered this exception. In hopes of helping anyone else that faces this issue in the future, I was using a property of type float within my class derived from TableServiceEntity. This is not a supported type and I was able to fix this by changing it to type double.

    Here is a link to the supported property types: 
    http://msdn.microsoft.com/en-us/library/windowsazure/dd179338.aspx


    • Edited by zemmf Wednesday, February 01, 2012 2:59 AM
    • Proposed As Answer by zemmf Sunday, February 05, 2012 11:14 PM
    •  
  • Wednesday, October 03, 2012 5:22 AM
     
     
    Yes! The exceptions in Azure generally are horrible. It just took me 30 minutes to figure out that I inadvertently used a decimal instead of a double in my class.
  • Thursday, October 11, 2012 12:38 PM
     
      Has Code

    I got this error as well, trying to execute this code:

    return View(CloudStorageAccount.Parse(connstring)
            .CreateCloudTableClient().GetDataServiceContext().CreateQuery<LogMessage >( "log")
            .OrderByDescending(l => l.Time)
            .Take(20));
    
    It turned out the line '.OrderByDescending(l => l.Time)' was causing the error...