SessionService hostname.

Jul 29, 2010 at 8:18 PM
Edited Jul 30, 2010 at 1:27 PM

I am often working several enterprise projects for customers simultaneously and find it helpful to keep separate PWAs and keep each PWA in it's own webapplication to make cleanup easier.

I create each PWA under its own hostheader and register the hostheader in the DNS or the local  hosts file I expect that I will eventually paramaterize the pwa as well. 

Constructing the pwaBaseUri from "localhost" just doesn't work for me.. so I changed the  PsiBaseUrl ggetter:

 if (!String.IsNullOrEmpty(ServerName))
 {

     return string.Format(
     "{0}{1}{2}/{3}/_vti_bin/psi/",
      UrlScheme,
      Uri.SchemeDelimiter,
      ServerName,
      Pwa);
 }
 else
 {
      return string.Format(
      "{0}{1}{3}/_vti_bin/psi/",
       UrlScheme,
       Uri.SchemeDelimiter,
       ServerName,
       Pwa);

  }

 

then immediately after the contstructor

var sessionService = new SessionService ();
sessionService.ServerName =
null ;