/// <Summary>
/// Author: Bruce Lee)
/// Created time:
/// Description: Get personal Web site.
/// Mender:
/// Modify time:
/// Modify description:
/// </Summary>
/// <Param name = "straccount"> personal account, for example: "satyambrucelee \ Administrator", for example, "satyambrucelee \ Administrator" </param>
/// <Param name = "strpersonalsitehost"> personal site host URL, for example: http: // satyambrucelee: 8086, personal site host URL, for example: http: // satyambrucelee: 8086 </param>
/// <Returns> </returns>
Public spweb getpersonalweb (string straccount, string strpersonalsitehost)
{
Spsite mysite = NULL;
Spweb myweb = NULL;
Spsite sppersonalsite = NULL;
Try
{
Sppersonalsite = new spsite (strpersonalsitehost );
Servercontext = servercontext. getcontext (sppersonalsite );
Userprofilemanager = new userprofilemanager (servercontext );
USERPROFILE = userprofilemanager. getuserprofile (straccount );
Mysite = USERPROFILE. personalsite;
Myweb = mysite. openweb ();
}
Catch (exception ex)
{
Throw ex;
}
Finally
{
Myweb. Dispose ();
Mysite. Dispose ();
Sppersonalsite. Dispose ();
}
Return myweb;
}