示例#1
0
        public static bool HandleRequestLocationException(Exception exception, BlogRequest blogRequest, IInstallationManager installManager, HttpResponseBase response)
        {
            if (blogRequest.RequestLocation != RequestLocation.Installation &&
                blogRequest.RequestLocation != RequestLocation.Upgrade)
            {
                if (installManager.InstallationActionRequired(VersionInfo.CurrentAssemblyVersion, exception))
                {
                    response.Redirect("~/install/default.aspx", true);
                    return(true);
                }
            }

            if (blogRequest.RequestLocation != RequestLocation.SystemMessages)
            {
                if (exception.GetType() == typeof(BlogInactiveException))
                {
                    response.Redirect("~/SystemMessages/BlogNotActive.aspx", true);
                    return(true);
                }
            }
            return(false);
        }
示例#2
0
        public static bool HandleRequestLocationException(Exception exception, BlogRequest blogRequest, IInstallationManager installManager, HttpResponseBase response)
        {
            if (blogRequest == null || (blogRequest.RequestLocation != RequestLocation.Installation &&
               blogRequest.RequestLocation != RequestLocation.Upgrade))
            {
                if (installManager.InstallationActionRequired(VersionInfo.CurrentAssemblyVersion, exception))
                {
                    response.Redirect("~/install/default.aspx", true);
                    return true;
                }
            }

            if (blogRequest.RequestLocation != RequestLocation.SystemMessages)
            {
                if (exception.GetType() == typeof(BlogInactiveException))
                {
                    response.Redirect("~/SystemMessages/BlogNotActive.aspx", true);
                    return true;
                }
            }
            return false;
        }