SharePoint2013使用ReportViewer控件(原)

来源:互联网 发布:软件开发工程师培训班 编辑:程序博客网 时间:2024/06/13 09:54

-------------------编写人:Lidan-------------------

前面有写过SharePoint2010中使用ReportViewer的,现把SharePoint2013中使用的配置也写一下,能供大家参考

(1)    <handlers></handlers>结点中添加如下内容(须添加在结点下第一行)

<add name="ReportViewerWebControlHandler" preCondition="integratedMode" verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

 

(2)    <httpHandlers></httpHandlers>结点中添加如下内容(须添加在结点下第一行)

<add verb="*" path="Reserved.ReportViewerWebControl.axd" type="Microsoft.Reporting.WebForms.HttpHandler, Microsoft.ReportViewer.WebForms, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />

 

(3)    <modules runAllManagedModulesForAllRequests=”true”>结点下,注释

<remove name=”Session” />

 

(5)    <pages enableSessionState=”false” enableViewState=”true” …/>修改为

<pages enableSessionState=”true” enableViewState=”true” …/>

 

(6)    <appSettings></appSettings>结点中注释

<add key="ReportViewerMessages" value="Microsoft.SharePoint.Portal.Analytics.UI.ReportViewerMessages, Microsoft.SharePoint.Portal, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />

 

-------------------------------另:如果遇到此错误-------------------------------

Unable to serialize the session state. In 'StateServer' and 'SQLServer' mode, ASP.NET will serialize the session state objects, and as a result non-serializable objects or MarshalByRef objects are not permitted. The same restriction applies if similar serialization is done by the custom sessionstate store in 'Custom' mode.

解决方案:

将<sessionState mode="SQLServer" timeout="60" allowCustomSqlDatabase="true" sqlConnectionString=.../>

修改为<sessionState mode="InProc" timeout="60" allowCustomSqlDatabase="true" sqlConnectionString=.../>

 

 

 

0 0
原创粉丝点击