Вопрос

Is there a particular configuration file from which the administrative port number of a SharePoint installation can be read from?

What I want is to get the administrative port number of a given SP installation programmtically.

Это было полезно?

Решение

basically their is no configuration file for this you can use stsadm command to get portnumber

stsadm -o getadminport

if you want use it using object model kindly use

SPAdministrationWebApplication details are provide at link below (this will give you url from which you can extract the port number

        SPAdministrationWebApplication caWebApp = Microsoft.SharePoint.Administration.SPAdministrationWebApplication.Local;
   url = caWebApp.Sites[0].Url;

http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.administration.spadministrationwebapplication_members.aspx

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top