Sometimes you don’t know if you’ll get a trailing slash or not with a web.Url or site.Url. Use the method:
public static string EnsureTrailingSlash(string strUrl)
{
if (!strUrl.EndsWith("/", StringComparison.OrdinalIgnoreCase))
strUrl += "/";
}
return strUrl;
Call like this: SharedUrlUtility.EnsureTrailingSlash(SharedUserProfiles.MySiteHostUrl);
Hope this helps- Rehman.