// Token: 0x06000395 RID: 917 RVA: 0x00016394 File Offset: 0x00014594 internal override AutodiscoverResponseMessage Execute() { GetDomainSettingsResponseMessage getDomainSettingsResponseMessage = new GetDomainSettingsResponseMessage(); GetDomainSettingsResponse response = getDomainSettingsResponseMessage.Response; ExchangeVersion?requestedVersion = this.Request.RequestedVersion; IPrincipal user = HttpContext.Current.User; string errorMessage; ExchangeVersion exchangeVersion; if (!AutodiscoverRequestMessage.ValidateRequest <string>(this.Request, this.Request.Domains, this.Request.RequestedSettings, null, GetDomainSettingsRequestMessage.maxDomainsPerGetDomainSettingsRequest, Strings.MaxDomainsPerGetDomainSettingsRequestExceeded, out errorMessage, out exchangeVersion)) { response.ErrorCode = ErrorCode.InvalidRequest; response.ErrorMessage = errorMessage; } else { HashSet <DomainConfigurationSettingName> hashSet; DomainSettingErrorCollection settingErrors; this.TryParseRequestDomainSettings(out hashSet, out settingErrors); if (hashSet.Count == 0) { response.ErrorCode = ErrorCode.InvalidRequest; response.ErrorMessage = Strings.NoSettingsToReturn; } else { string userAgent = Common.SafeGetUserAgent(HttpContext.Current.Request); GetDomainSettingsCallContext callContext = new GetDomainSettingsCallContext(userAgent, this.Request.RequestedVersion, this.Request.Domains, hashSet, settingErrors, response); try { this.ExecuteGetDomainSettingsCommand(user, callContext); } catch (OverBudgetException arg) { ExTraceGlobals.FrameworkTracer.TraceError <OverBudgetException>(0L, "GetDomainSettingsRequestMessage.Execute()returning ServerBusy for exception: {0}.", arg); response.ErrorCode = ErrorCode.ServerBusy; response.ErrorMessage = Strings.ServerBusy; response.DomainResponses.Clear(); } catch (LocalizedException ex) { ExTraceGlobals.FrameworkTracer.TraceError <LocalizedException>(0L, "GetDomainSettingsRequestMessage.Execute()returning InternalServerError for exception: {0}.", ex); Common.EventLog.LogEvent(AutodiscoverEventLogConstants.Tuple_ErrWebException, Common.PeriodicKey, new object[] { ex.Message, ex }); response.ErrorCode = ErrorCode.InternalServerError; response.ErrorMessage = Strings.InternalServerError; response.DomainResponses.Clear(); } } } return(getDomainSettingsResponseMessage); }
internal GetDomainSettingsCallContext(string userAgent, ExchangeVersion?requestedVersion, DomainCollection domains, HashSet <DomainConfigurationSettingName> requestedSettings, DomainSettingErrorCollection settingErrors, GetDomainSettingsResponse response) { this.userAgent = userAgent; this.requestedVersion = requestedVersion; this.domains = domains; this.requestedSettings = requestedSettings; this.settingErrors = settingErrors; this.response = response; }