Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
516 views
in Technique[技术] by (71.8m points)

asp.net - HTTP Meta Tags in SQL Server SSRS 2012 Web Pages

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.MSSQLSERVERReporting ServicesReportServerPages 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.MSSQLSERVERReporting ServicesReportManagerPages 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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I have found a workaround that seems to be working ok allthough the markup looks strange. You just simply add to ... ReportManagerPagesReport.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).


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...