none
OData issue in Project Server 2013 RRS feed

  • Question

  • Hi everyone, I have a problem, I create a timer job that
    execute a C# code get the tasks user information to modify some data, but when
    I trying to save the modifications it shows me this error

    <?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-2130575251, Microsoft.SharePoint.SPException</m:code><m:message xml:lang="en-US">The security validation for this page is invalid and might be corrupted. Please use your web browser's Back button to try your operation again.</m:message></m:error>

    The way that I trying to save the modification is this

    context.BeginSaveChanges(new AsyncCallback(r =>
                {
                    try
                    {
                        var dsr = context.EndSaveChanges(r);
                        if (dsr.Any(op => op.Error != null))
                        {
                            //Show error message
                        }
                        else
                        {
                            //Succeeded
                        }
                        _finish = true;
                    }
                    catch (Exception ex)
                    {
                        _finish = true;
                        Console.WriteLine("Error Result: " + ex.InnerException.ToString());
                    }
                }), null);
    
                do
                {
                    System.Threading.Thread.Sleep(1000);
                } while (!_finish);
    

    The error shows in this part:

    var dsr = context.EndSaveChanges(r);

    I hope you can help me, I can't find a good source to trying to modify the information.

    Regards.


    .Net Developer and SharePoint programmer


    Thursday, December 5, 2013 6:54 PM