Hi all,
I hope someone can help?
I get a 401.5 error when i try to retrieve the Names public property of the SPWebCollection class.
Code:
SPSite siteColl = new SPSite(targetWebSite.Url);
SPWeb site = siteColl.OpenWeb();
SPWebCollection siteCollection = site.Webs;
// Return just the server relative URLs if requested.
if (bServerRelativeURL)
{
return siteCollection.Names;
}
Can anyone tell me why or a workaround for this, if i give the user contributer to the site then the code runs fine but i cannot understand why i can run some code before i get the 401.
Best Regards
Jared
I hope someone can help?
I get a 401.5 error when i try to retrieve the Names public property of the SPWebCollection class.
Code:
SPSite siteColl = new SPSite(targetWebSite.Url);
SPWeb site = siteColl.OpenWeb();
SPWebCollection siteCollection = site.Webs;
// Return just the server relative URLs if requested.
if (bServerRelativeURL)
{
return siteCollection.Names;
}
Can anyone tell me why or a workaround for this, if i give the user contributer to the site then the code runs fine but i cannot understand why i can run some code before i get the 401.
Best Regards
Jared