I need to be able to create a new site collectio开发者_StackOverflown from one SharePoint 2010 farm to another. I.e. the user fills out the forms associated in SharePoint Farm 1 and creates a site collection with the specified info in SharePoint Farm 2.
I have considered the following alternatives:
- Using the Client Object Model (COM), but the highest available object is SPSite, and I need a SPWebApplication object to create a new site collection.
- Using a built in SharePoint 2010 Web Service, but which one? Neither WebSvcAdmin, WebSvcSiteData, or WebSvcsites seems to be able to do this.
- Implement a custom web service, but what about authentication?
You need to use SPWebApplicationBuilder class.
But instead of SPFarm.Local
use SPFarm.Open(SqlConnectionStringBuilder connectionString, string user, string password)
精彩评论