SharePoint 2010 自定义aspx页面装载PPS report空引用异常处理

需要一个空页面,只显示perfromancepoint report. 在sharepoint designer 2007中,直接创建一个aspx页面,然后加zone,加webpart即可显示,但是在sharepoint designer 2010中时按此操作,当preview this page的时候,页面报空引用异常。异常内容如下:

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.]
   Microsoft.PerformancePoint.Scorecards.WebControls.ClientWebPart.Render(HtmlTextWriter writer) +2880
   Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter output, WebPart part) +42

[WebPartException: Object reference not set to an instance of an object.]
   Microsoft.SharePoint.WebPartPages.SPChrome.RenderPartContents(HtmlTextWriter output, WebPart part) +19623302
   Microsoft.SharePoint.WebPartPages.SPChrome.RenderWebPart(HtmlTextWriter output, WebPart part) +64
   Microsoft.SharePoint.WebPartPages.WebPartZone.RenderZoneCell(HtmlTextWriter output, Boolean bMoreParts, WebPart part) +1997
   Microsoft.SharePoint.WebPartPages.WebPartZone.RenderWebParts(HtmlTextWriter output, ArrayList webParts) +508
   Microsoft.SharePoint.WebPartPages.WebPartZone.Render(HtmlTextWriter output) +1000
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +253
   System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +87
   System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +53
   System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +240
   System.Web.UI.Page.Render(HtmlTextWriter writer) +38
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4240


Version Information: Microsoft .NET Framework Version:2.0.50727.4927; ASP.NET Version:2.0.50727.4927

Server Error in '/' Application.

Object reference not set to an instance of an object.

 

处理办法:

1. 按正常程序(sharepoint desinger 2007 中的操作方法) 在sharepoint designer 2010中加入PPS report webpart.

(这个时候preview this page,即会出现上述异常!)

2.在form 中增加如下代码,即可解决这个问题! 

<asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false" EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true" />

什么原因不用说了吧。这个是sharepoint 2010!

 

对于2010的应用正在熟悉摸索中。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值