Beispiel #1
0
        public static void ThrowException(AuthorizationException e)
        {
                context = HttpContext.Current;

                context.Server.ClearError();

                if (e.ErrorMessage != null && !e.ErrorMessage.Equals(string.Empty))
                    context.Items.Add(ImageServerConstants.ContextKeys.ErrorMessage, e.ErrorMessage);
                if (e.ErrorDescription != null && !e.ErrorDescription.Equals(string.Empty))
                    context.Items.Add(ImageServerConstants.ContextKeys.ErrorDescription, e.ErrorDescription);

                context.Server.Transfer(ImageServerConstants.PageURLs.AuthorizationErrorPage);
        }
Beispiel #2
0
        public static void ThrowException(AuthorizationException e)
        {
            context = HttpContext.Current;

            context.Server.ClearError();

            if (e.ErrorMessage != null && !e.ErrorMessage.Equals(string.Empty))
            {
                context.Items.Add(ImageServerConstants.ContextKeys.ErrorMessage, e.ErrorMessage);
            }
            if (e.ErrorDescription != null && !e.ErrorDescription.Equals(string.Empty))
            {
                context.Items.Add(ImageServerConstants.ContextKeys.ErrorDescription, e.ErrorDescription);
            }

            context.Server.Transfer(ImageServerConstants.PageURLs.AuthorizationErrorPage);
        }
        public static void ThrowException(AuthorizationException e)
        {
            context = HttpContext.Current;

            context.Server.ClearError();

            if (e.ErrorMessage != null && !e.ErrorMessage.Equals(string.Empty))
            {
                context.Items.Add(ImageServerConstants.ContextKeys.ErrorMessage, e.ErrorMessage);
            }
            if (e.ErrorDescription != null && !e.ErrorDescription.Equals(string.Empty))
            {
                context.Items.Add(ImageServerConstants.ContextKeys.ErrorDescription, e.ErrorDescription);
            }


            Platform.Log(LogLevel.Error, "{0} is not authorized to view {1}", SessionManager.Current.User.DisplayName, context.Request.RawUrl);
            context.Server.Transfer(ImageServerConstants.PageURLs.AuthorizationErrorPage);
        }
Beispiel #4
0
        public static void ThrowException(AuthorizationException e)
        {
                context = HttpContext.Current;

                context.Server.ClearError();

                if (e.ErrorMessage != null && !e.ErrorMessage.Equals(string.Empty))
                    context.Items.Add(ImageServerConstants.ContextKeys.ErrorMessage, e.ErrorMessage);
                if (e.ErrorDescription != null && !e.ErrorDescription.Equals(string.Empty))
                    context.Items.Add(ImageServerConstants.ContextKeys.ErrorDescription, e.ErrorDescription);


                Platform.Log(LogLevel.Error, "{0} is not authorized to view {1}", SessionManager.Current.User.DisplayName, context.Request.RawUrl);
                context.Server.Transfer(ImageServerConstants.PageURLs.AuthorizationErrorPage);
        }