任何人都可以解釋此異常嗎?在 '/ eims_web' 應用空引用異常堆棧
服務器錯誤:
Object reference not set to an instance of an object.
說明:
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.
異常詳細信息:
System.NullReferenceException: Object reference not set to an instance of an object.
源錯誤:
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.
堆棧跟蹤:
[NullReferenceException: Object reference not set to an instance of an object.]
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +24
System.Xml.XmlDocument.Load(XmlReader reader) +108
System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency) +342
System.Web.UI.WebControls.XmlDataSource.GetXmlDocument() +253
System.Web.UI.WebControls.XmlHierarchicalDataSourceView.Select() +51
System.Web.UI.WebControls.Menu.DataBindItem(MenuItem item) +326
System.Web.UI.WebControls.Menu.PerformDataBinding() +99
System.Web.UI.WebControls.HierarchicalDataBoundControl.PerformSelect() +126
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +125
System.Web.UI.WebControls.Menu.DataBind() +29
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +104
System.Web.UI.WebControls.Menu.EnsureDataBound() +70
System.Web.UI.WebControls.BaseDataBoundControl.OnPreRender(EventArgs e) +43
System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e, Boolean registerScript) +89
System.Web.UI.WebControls.Menu.OnPreRender(EventArgs e) +63
System.Web.UI.Control.PreRenderRecursiveInternal() +200
System.Web.UI.Control.PreRenderRecursiveInternal() +322
System.Web.UI.Control.PreRenderRecursiveInternal() +322
System.Web.UI.Control.PreRenderRecursiveInternal() +322
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4837
它看起來像你的XmlDocument未能加載。確保你的xml聲明是正確的,並且xml結構中沒有錯誤。 – 2011-02-01 05:54:37