예제 #1
0
        public override void Process(MediaRequestHandlerArgs handlerArgs)
        {
            if (handlerArgs.Media != null)
            {
                return;
            }

            var notFoundUrl = GetNotFoundUrl();

            if (string.IsNullOrWhiteSpace(notFoundUrl))
            {
                return;
            }

            var httpServer = _httpServerThunk();

            httpServer.TransferRequest(notFoundUrl);
            handlerArgs.Result = true;
            handlerArgs.AbortPipeline();
        }
        public override void Process(MediaRequestHandlerArgs handlerArgs)
        {
            if (handlerArgs.Media != null)
            {
                return;
            }
            if (!PermissionDenied(handlerArgs))
            {
                return;
            }

            var loginUrl = GetLoginUrl();

            if (string.IsNullOrWhiteSpace(loginUrl))
            {
                return;
            }

            var httpResponse = _httpResponseThunk();

            httpResponse.Redirect(loginUrl);
            handlerArgs.Result = true;
            handlerArgs.AbortPipeline();
        }