i occasionally get errors such as the one below when using this component. please advise on whether there is a graceful way to handle this?
Server Error in '/WebSite1' Application.
Object reference not set to an instance of an object.
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.]
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +39
System.Xml.XmlDocument.Load(XmlReader reader) +159
System.Web.UI.WebControls.XmlDataSource.PopulateXmlDocument(XmlDocument document, CacheDependency& dataCacheDependency, CacheDependency& transformCacheDependency) +388
System.Web.UI.WebControls.XmlDataSource.GetXmlDocument() +206
System.Web.UI.WebControls.XmlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +53
System.Web.UI.WebControls.BaseDataList.GetData() +54
System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +381
System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +77
System.Web.UI.WebControls.BaseDataList.DataBind() +85
System.Web.UI.WebControls.BaseDataList.EnsureDataBound() +82
System.Web.UI.WebControls.BaseDataList.CreateChildControls() +91
System.Web.UI.Control.EnsureChildControls() +134
System.Web.UI.Control.PreRenderRecursiveInternal() +109
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Control.PreRenderRecursiveInternal() +233
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4436
tonyjo123
Member
117 Points
37 Posts
Consuming RSS Feed using ASP.NET
Apr 21, 2008 08:54 AM|LINK
i'm trying to consume RSS Feed using ASP.NET with c# as followsConsuming RSS Feed using ASP.NET
<%
@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><!
DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" ><
head id="Head1" runat="server"> <title>RSS Feed</title></
head><
body> <form id="form1" runat="server"> <div> <asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile=http://feeds.feedburner.com/mathrubhumi XPath="rss/channel/item"></asp:XmlDataSource> </div> <asp:DataList ID="DataList1" runat="server" DataSourceID="XmlDataSource1" BackColor="White" BorderColor="#404040" BorderStyle="Solid" GridLines="Vertical"> <ItemTemplate><%
#XPath("title")%><br /><%
#XPath("pubDate")%><br /><%
#XPath("author")%><br /> <%#XPath("description")%> </ItemTemplate> </asp:DataList> </form></
body></
html>i occasionally get errors such as the one below when using this component. please advise on whether there is a graceful way to handle this?
Server Error in '/WebSite1' Application.
Object reference not set to an instance of an object.
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:
Stack Trace:
RSS Feed