none
Silverlight - Microsoft.Sharepoint.Client.ClientContext - The remote server returned an error: NotFound.

    Question

  • We are having permissions issues with accounts other than admin querying libraries through

    context.ExecuteQueryAsync. 

    We are getting the dreaded Silverlight exception "The remote server returned an error: NotFound." 

    I know there is a workaround for this - if you get the error from a wcf service that you configured/created.

    Is there a way to get the actual error back from Microsoft.Sharepoint.Client.ClientContext? 

    I think this involves the Silverlight bug of treating 200 errors as 404s.

     


    Wednesday, October 12, 2011 5:49 PM

Answers

All replies

  • Hi nik,

    Can you please post your entire code?

    Wednesday, October 12, 2011 6:10 PM
  •   private void OnRequestFailed(Object sender, ClientRequestFailedEventArgs args)
            {
                _errorMsg = args.Message;
                Dispatcher.BeginInvoke(LogError);
            }
    
     ClientContext context = new ClientContext(l.SiteURL);
                    context.Load(context.Web);
    
                    List Cases = context.Web.Lists.GetByTitle(l.Library);
                    context.Load(Cases);
    
                    _cases[l.ID] = Cases.GetItems(query);
    
                    context.Load(
                        _cases[l.ID],
                        items => items.Include(
                         *<span style="font-family:"Calibri","sans-serif"; font-size:11pt">obfuscated by Nik Saint Louis* </span>                        )
                        );
    
                    context.ExecuteQueryAsync(new ClientRequestSucceededEventHandler(OnCaseRequestSucceeded), new ClientRequestFailedEventHandler(OnRequestFailed));
            
    
    Wednesday, October 12, 2011 8:05 PM
  • Hi Nik,

    Are you getting this error when uploading some files to the document library?

    See the following link for more details:

    http://social.technet.microsoft.com/Forums/ar/sharepoint2010programming/thread/7abbfda6-2ba6-4b93-a5e1-c9b6154c68fd

     

    Wednesday, October 12, 2011 9:48 PM
  • The error appears when the user doesnt have the correct AD/Sharepoint permissions on a select. I just want a fix to get the real exception, and some clue as to the incorrect permissions, not the erroneous Silverlight message - because Silverlight treates 200 as 404. -There is a work around involving custom behaviors for wcf you create - just looking for one for the Sharepoint WCF.

     

     

    Wednesday, October 12, 2011 10:08 PM
  • Here is a link to the NotFound Silverlight wcf fix

    http://blog.benday.com/archive/2010/08/16/23286.aspx

     

    • Marked as answer by Zizhuoye Chen Thursday, October 20, 2011 1:32 AM
    Thursday, October 13, 2011 12:59 AM
  • FYI I havent found a way to set this up on the client side sharepoint object model - that apparently uses wcf.

     

    Thursday, October 20, 2011 4:39 PM
  • When will you people learn not to post links as answers?
    Wednesday, September 04, 2013 7:10 PM