3

Resolved

Cannot redirect after HTTP headers have been sent.

description

Issue Orchard 1.x: Returning HttpUnauthorizedResult() from a controller instead of a View actionresult, produces the following error, Cannot redirect after HTTP headers have been sent.

I had to put the following lines back to OutputCacheFilter.cs (OnResultExecuted(...) to avoid the error
// only for ViewResult right now, as we don't want to handle redirects, HttpNotFound, ...
            if (filterContext.Result as ViewResultBase == null) {
                Logger.Debug("Ignoring none ViewResult response");
                return;
            }

comments

Piedone wrote Sep 2, 2013 at 11:08 AM