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));
thanks in advance,
Check my website http://www.kbworks.nl or follow me on @KbWorks be sure to Check my KbWorks blog
Monday, February 01, 2010 9:08 PMyou can try this: (I haven't tested it yet)
context.AuthenticationMode = ClientAuthenticationMode.Anonymous;
Hope this helps
Serge Luca; blog: http://sergeluca.spaces.live.com Devoteam Belgium