HTTP Meta Tags in SQL Server SSRS 2012 Web Pages

回眸只為那壹抹淺笑 提交于 2019-11-26 23:38:04

问题


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:


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).



来源:https://stackoverflow.com/questions/24091942/http-meta-tags-in-sql-server-ssrs-2012-web-pages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!