HTTP Meta Tags in SQL Server SSRS 2012 Web Pages

2019-01-15 21:26发布

We have SQL Server 2012 with SSRS installed on Windows Server 2008. There are some issues with reports not displaying correctly unless compatibility mode is enabled in IE 10.

We also have a development server with the same setup but there the reports load fine because all pages rendered by the report server have the following meta tag: <META HTTP-EQUIV="X-UA-Compatible" CONTENT="IE=5">

Our production server does not have this and I am trying to add the same meta tag there but can't figure out how and the person who originally setup our dev server is no longer here.

I tried looking at MSRS11.MSSQLSERVER\Reporting Services\ReportServerPages and editing ReportViewer.aspx but it doesn't matter how I modify the meta tag or even if I completely remove it from the file, all rendered pages still have the original one that I mentioned above.

I then tried looking in MSRS11.MSSQLSERVER\Reporting Services\ReportManager\Pages thinking that I can edit the individual files like Folder.aspx or Report.aspx but when I open those files all they contain is this:

    <%@ Page language="c#" Codebehind="Folder.aspx.cs" AutoEventWireup="false"                 Inherits="Microsoft.ReportingServices.UI.FolderPage" EnableEventValidation="false" %>
    <%@ Register TagPrefix="MSRS" Namespace="Microsoft.ReportingServices.UI" Assembly="ReportingServicesWebUserInterface" %>

So there is no place to add the meta tag. I also looked in web.config and I don't see anything there that is adding the meta tag to all the pages.

I am not sure where else to look and can't figure out how the meta tag was added. It's obviously not a default out of the box setting since it's not there on our production box.

1条回答
The star\"
2楼-- · 2019-01-15 22:09

I have found a workaround that seems to be working ok allthough the markup looks strange. You just simply add to ... \ReportManager\Pages\Report.aspx the markup bellow

<head>
 <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta>    
</head>

When it is rendered the source contains both meta tags but it uses this one (teste on IE 11).

查看更多
登录 后发表回答