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


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


    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.


    • Edited by NLSL Wednesday, October 12, 2011 6:07 PM
    Wednesday, October 12, 2011 5:49 PM


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;
     ClientContext context = new ClientContext(l.SiteURL);
                    List Cases = context.Web.Lists.GetByTitle(l.Library);
                    _cases[l.ID] = Cases.GetItems(query);
                        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:


    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


    • 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