/// <summary> /// Configure the SOAP header before calling operations. /// </summary> protected void ConfigureSOAPHeader() { // Set the value of MailboxCulture. MailboxCultureType mailboxCulture = new MailboxCultureType(); string culture = Common.GetConfigurationPropertyValue("MailboxCulture", this.Site); mailboxCulture.Value = culture; // Set the value of ExchangeImpersonation. ExchangeImpersonationType impersonation = new ExchangeImpersonationType(); impersonation.ConnectingSID = new ConnectingSIDType(); PrimarySmtpAddressType address = new PrimarySmtpAddressType(); address.Value = Common.GetConfigurationPropertyValue("User1Name", this.Site) + "@" + Common.GetConfigurationPropertyValue("Domain", this.Site); impersonation.ConnectingSID.Item = address; // Set time zone value. TimeZoneDefinitionType timezoneDefin = new TimeZoneDefinitionType(); timezoneDefin.Id = "Eastern Standard Time"; TimeZoneContextType timezoneContext = new TimeZoneContextType(); timezoneContext.TimeZoneDefinition = timezoneDefin; Dictionary<string, object> headerValues = new Dictionary<string, object>(); headerValues.Add("MailboxCulture", mailboxCulture); headerValues.Add("ExchangeImpersonation", impersonation); headerValues.Add("TimeZoneContext", timezoneContext); this.FOLDAdapter.ConfigureSOAPHeader(headerValues); }