I have a sharepoint web application, with two subsites "test1" and "test2".
I am trying to get the subsites using classes from Microsoft.SharePoint.Client namespace.
var context = new ClientContext(string.Format("http://{0}", "www05:48042"));
context.Credentials = new NetworkCredential(credentials.Login, credentials.Password);
var sites = context.Web.Webs;
context.Load(sites);
context.ExecuteQuery();
Login and password are correct. However, I am always getting an empty collection in webs, but should get at least 2 elements. What am I doing wrong? Any suggestions?
SPWebApplication