public void OnResultExecuting(ResultExecutingContext filterContext) { var response = filterContext.HttpContext.Response; if (response.ContentType != "text/html") return; if (filterContext.HttpContext.Request.Browser.Type.ToUpper().Contains("IE")) return; response.ContentType = "application/xhtml+xml"; }