Monday, February 2, 2009

Finding alternate access mapped Urls for Web Application

Scenario:
Finding alternate access mapped Urls for Web Application.

Solution:
Object Model

Code:

SPWebApplication webApp = SPWebApplication.Lookup(System.Web.HttpContext.Current.Request.Url);                

foreach (SPAlternateUrl alternateUrl in webApp.AlternateUrls){
// Do something
}

0 comments: