Vítejte na blog.vyvojar.cz Přihlásit | Registrovat | Pomoc

How to obtain Central administration URL

Recently I was stuck a little on the problem, how to obtain URL of the Central administration web application. After little research I've found out 2 quite simple ways:

 

1. Using SPAdministrationWebApplication

 

SPAdministrationWebApplication.Local.IisSettings[0].Path.Name

Now you just have to determine host name and append port to it.

 

2. Using Registry

 

Registry.GetValue(@"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\WSS", "CentralAdministrationURL", "none")

 

Both cases working fine for me.

Zveřejněno 4. května 2010 16:09 by mminarik
Vedeno pod: ,

Komentář

Žádné komentáře
Neregistrovaní uživatele nemužou přidávat komentáře.
 
Vyvojar.cz na prodej!