views:

274

answers:

3

The steps are as simple as that so I imagine there's something else going on here, the problem is I just get back 4004, no exception anywhere etc, making it annoying to debug, I get this from the ie error window

Microsoft JScript runtime error: Unhandled Error in Silverlight Application Code: 4004
Category: ManagedRuntimeError
Message: System.Windows.Ria.DomainOperationException: Submit operation failed. An error occurred while updating the entries. See the inner exception for details. at System.Windows.Ria.OperationBase.Complete(Exception error) at System.Windows.Ria.SubmitOperation.Complete(Exception error) at System.Windows.Ria.DomainContext.CompleteSubmitChanges(IAsyncResult asyncResult) at System.Windows.Ria.DomainContext.<>c_DisplayClassd.b_5(Object )

 public void TurnPage(bool forward)
        {
            TurnPageForward = forward;
            // If the pages are already turning then don't try and skip days, just run the animation function so it inreases the speed
            if (!workBook.IsTransitioning && !IsWaitingForData)
            {
                IsWaitingForData = true;
                workBook.SnapshotPages();

                NoteCtx.SubmitChanges().Completed += (s, a) =>
                                                         {

                                                             workBook.ClearPageContents();
                                                             CurrentDate = CurrentDate.AddDays(forward ? 1 : -1);
                                                             PullNotes(CurrentDate);
                                                         };
            }
            else
            {
                workBook.BeginTurnPages(TurnPageForward);
            }
        }


        public void PullNotes(DateTime? noteTime)
        {
            NoteCtx.NoteItems.Clear();
            var loadOp = NoteCtx.Load(NoteCtx.GetNoteItemsForDayQuery(CurrentDate));
            loadOp.Completed += new EventHandler(NotesReady);
        } 
A: 

See the inner exception for details.

That's the key. Run your server under the debugger, set it to break on thrown exceptions (Debug -> Exceptions), and look at the InnerException when it stops.

Craig Stuntz
running fiddler will also show you all of the errors that ria sends to the client.
johnnywhoop
A: 

Got it fixed, turns out that even if 2 databases are identical in schema, if you're switching which one you're referencing you HAVE to regenerate your EDMX file.

Tarks
A: 

Doesn't IIS log the error someplace?