Code to Get the SharePoint Central administration site URL:
Add namespace:
using Microsoft.Sharepoint.Administration;
Add below code
Microsoft.SharePoint.Administration.SPAdministrationWebApplication centralWeb =
SPAdministrationWebApplication.Local;
string webAppUrl = centralWeb.Sites[0].Url;
No comments:
Post a Comment