예제 #1
0
        protected virtual bool ShouldRedirectWithoutUnnecessaryParams(out string destinationUrl)
        {
            destinationUrl = null;
            string uriString = this.Context.Request.Url.OriginalString;
            string text      = this.Context.Request.Headers["msExchProxyUri"];

            if (!string.IsNullOrEmpty(text))
            {
                uriString = text;
            }
            Uri uri = new Uri(uriString);
            NameValueCollection coll = HttpUtility.ParseQueryString(uri.Query);
            string str = null;

            if (DefaultPageBase.QueryHasUnnecessaryParameters(coll, out str))
            {
                string text2 = uri.AbsolutePath;
                if (text2.ToLowerInvariant().EndsWith("default.aspx"))
                {
                    text2 = text2.Substring(0, text2.Length - "default.aspx".Length);
                }
                text2         += str;
                destinationUrl = text2;
                return(true);
            }
            return(false);
        }