internal static void TransferToErrorPage(string cause, bool showCallStack)
        {
            HttpContext httpContext = HttpContext.Current;

            if (httpContext.IsWebServiceRequest())
            {
                ErrorHandlingModule.SendJsonError(httpContext, httpContext.GetError(), cause);
                return;
            }
            if (httpContext.IsUploadRequest())
            {
                ErrorHandlingModule.SendJsonErrorForUpload(httpContext, httpContext.GetError());
                return;
            }
            EcpPerfCounters.RedirectToError.Increment();
            if (!showCallStack)
            {
                httpContext.ClearError();
            }
            httpContext.Response.Clear();
            string text  = string.Format("~/error.aspx?cause={0}", cause);
            string text2 = httpContext.Request.QueryString["isNarrow"];

            if (text2 != null)
            {
                text = EcpUrl.AppendQueryParameter(text, "isNarrow", text2);
            }
            httpContext.Server.Transfer(text);
        }
Beispiel #2
0
        private void SetAddExtensionUrl(PowerShellResults <SetUMMailboxConfiguration> result)
        {
            Section             section             = base.Sections["UMMailboxExtensionSection"];
            EcpCollectionEditor ecpCollectionEditor = (EcpCollectionEditor)section.FindControl("ceExtensions");

            ecpCollectionEditor.PickerFormUrl = EcpUrl.AppendQueryParameter(ecpCollectionEditor.PickerFormUrl, "dialPlanId", result.Value.DialPlanId);
        }
Beispiel #3
0
        private void SetResetPinUrl()
        {
            Section       section       = base.Sections["UMMailboxConfigurationSection"];
            PopupLauncher popupLauncher = (PopupLauncher)section.FindControl("popupLauncherDataCenter");

            popupLauncher.NavigationUrl = EcpUrl.AppendQueryParameter(popupLauncher.NavigationUrl, "id", base.ObjectIdentity.RawIdentity);
        }
Beispiel #4
0
        private static string InternalOnPremiseLinkToOffice365(string serviceInstance)
        {
            if (EacEnvironment.Instance.IsDataCenter)
            {
                return(string.Empty);
            }
            string url = CrossPremiseUtil.InternalGetLinkToCrossPremise(HttpContext.Current, HttpContext.Current.Request, serviceInstance);

            return(EcpUrl.AppendQueryParameter(url, "ov", "1"));
        }
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            this.image = this.FindImage(this, "imgUserPhoto");
            Identity identity = Identity.FromExecutingUserId();

            foreach (PopupLauncher popupLauncher in this.GetVisibleControls <PopupLauncher>(this))
            {
                popupLauncher.NavigationUrl = EcpUrl.AppendQueryParameter(popupLauncher.NavigationUrl, "id", identity.RawIdentity);
            }
        }
Beispiel #6
0
        protected override void OnPreRender(EventArgs e)
        {
            base.OnPreRender(e);
            if (string.IsNullOrEmpty(this.Page.Request["dialPlanId"]))
            {
                throw new BadQueryParameterException("dialPlanId");
            }
            EcpSingleSelect ecpSingleSelect = (EcpSingleSelect)base.ContentContainer.FindControl("pickerUMDialPlan");

            ecpSingleSelect.PickerFormUrl = EcpUrl.AppendQueryParameter(ecpSingleSelect.PickerFormUrl, "dialPlanId", this.Page.Request["dialPlanId"]);
        }
Beispiel #7
0
        private void CalculateUrl()
        {
            Uri uri = new Uri(this.url, UriKind.RelativeOrAbsolute);

            if (!uri.IsAbsoluteUri)
            {
                string text  = EcpUrl.GetLeftPart(this.url, UriPartial.Path);
                string text2 = this.url.Substring(text.Length);
                text = VirtualPathUtility.ToAbsolute(text);
                if (!string.IsNullOrEmpty(text2))
                {
                    text += text2;
                }
                text = EcpUrl.AppendQueryParameter(text, "exsvurl", "1");
                uri  = new Uri(text, UriKind.Relative);
            }
            this.calculatedUrl = uri;
        }
Beispiel #8
0
        protected override void BeginGetNavBarPack(ShellServiceClient client, NavBarInfoRequest request)
        {
            string value = HttpContext.Current.Request.QueryString["flight"];

            if (!string.IsNullOrEmpty(value))
            {
                EndpointAddress address = client.Endpoint.Address;
                Uri             uri     = new Uri(EcpUrl.AppendQueryParameter(address.Uri.AbsoluteUri, "flight", value));
                client.Endpoint.Address = new EndpointAddress(uri, address.Identity, new AddressHeader[0]);
            }
            this.stopwatch = new Stopwatch();
            this.stopwatch.Start();
            this.shellServiceTask = new Task(delegate()
            {
                this.GetNavBarInfoAndHandleException(client, request);
            });
            this.shellServiceTask.Start();
        }
Beispiel #9
0
 internal static string AppendLanguageOverriddenParameter(string url)
 {
     return(EcpUrl.AppendQueryParameter(url, "mkt", CultureInfo.CurrentUICulture.Name));
 }