已答覆 problem with clientcontext excuting anonymous

  • Friday, January 29, 2010 9:55 PM
     
     

    Hi everybody i have a example which i use to create a bing map.
    What happens is when i try to execute the query it returns security error.

    The site that it is connecting to is anonymous i think this is why the problem exists.
    It seems that the clientcontext may not read items of a list if the current user is anonymous.

    does anybody have a workaround for it?

    context = new ClientContext(@httP://kbworks.nl/portfolios);
     
    if (context == null)
    throw new Exception("Connection failed!");
    Web web = context.Web;
    String listName = "Customers";
    ListCollection lists = web.Lists;
    IEnumerable<List> resultLists = context.LoadQuery(lists.Where(list => list.RootFolder.Name == listName));
    context.executequery();

    thanks in advance,

    Paul Keijzers

     


    Check my website http://www.kbworks.nl or follow me on @KbWorks be sure to Check my KbWorks blog

All Replies