~SharePoint 2013用服务器端对象模型,设置管理中心
如上图,经过探究发现,SharePoint的appcatelog就是一个SPCateLog模板的网站,所以创建这样的应用程序目录,只需要创建一个SPSite即可,但是,管理中心还需要设置为该应用程序的应用程序目录,否则,只是以一个单独网站的形式存在。
求助~如何用SharePoint 服务器对象模型,设置管理中心,目前尝试过SPWebApplication,但是没有设置的地方,请大家多多指教!谢谢!
附:SPCateLog的模板类型SPWebTemplate.WebTemplate.AppCatalog.ToString(),其实输出就是SPCatelog;
------解决方案--------------------
SharePoint没有将这个操作封装出来,Microsoft.SharePoint.Marketplace.CorporateCuratedGallery.SPCorporateCuratedGalleryManager,这个内部类实现的。
new SPCorporateCuratedGalleryManager(SPWebApplication).SetHostSite(siteUrl);
如果楼主想掉,试着用反射调用这个对象去实现吧。
------解决方案--------------------
参考: http://blogs.technet.com/b/speschka/archive/2010/08/11/using-powershell-for-sharepoint-2010-in-c.aspx