Grab list of site collections from SPFarm object
-
09-12-2019 - |
Question
I have a Farm level feature that returns null when I try to access SPContect.Current.Site
. Is another way to grab a list of site collections? I have access to SPFarm.Local
Solution
Check this link... You need to get the web applications first then iterate through each web application's sites.
Can't this be a web applicatiion feature? Why exactly would you make it a farm feature?
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange