in

SharePoint University

Clean slate. Nothing but SharePoint.
Go, SharePoint!

access denied error by accessing site.AllWebs in code

Last post 10-09-2007 8:01 AM by juniormoss. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 10-09-2007 8:01 AM

    access denied error by accessing site.AllWebs in code

    Hi All,

     I have the following error in code.

    SPWebServiceCollection webServices = new SPWebServiceCollection(SPFarm.Local);

                    foreach (SPWebService webService in webServices)
                    {
                        foreach (SPWebApplication webApp in webService.WebApplications)
                        {
                            foreach (SPSite site in webApp.Sites)
                            {
                                  if (site.ReadLocked == false)
                                {
                                    foreach (SPWeb web in site.AllWebs)

    I have a foreach loop to iteratie with spWeb web in site.AllWebs, but when i want to use the site.AllWebs, i get an access denied error.

     

    Can anybody help me due this error?

    Thanks

     

    Juniormoss :)

Page 1 of 1 (1 items)

Need SharePoint Training? Attend a SharePoint Bootcamp!
Forum content (c) original posters. Everything else (c) 2008 SharePoint Experts, Inc.