Sunday, February 12, 2012

Get a List of Site Collections in a Web Application in SharePoint

            

               SPWebApplication webApp = SPWebApplication.Lookup(new Uri(“WebApplication URL”));

               foreach (SPSite site in webApp.Sites)
               {
                   radCmbSiteCollList.Items.Add(new RadComboBoxItem(site.Url));
                   site.Dispose();
               }

No comments:

Post a Comment

Access to XMLHttpRequest at 'from origin has been blocked by CORS policy: Cross origin requests are only supported for protocol schemes: http, data, chrome, chrome-extension, https. .net core angular

Issue: The angular application was getting error from API that the origin has been blocked by CORS policy. Solution: Make sure that the...