Click here to Skip to main content
15,919,121 members
Home / Discussions / C#
   

C#

 
GeneralRe: Data Currency???????? Pin
Heath Stewart7-Apr-04 8:36
protectorHeath Stewart7-Apr-04 8:36 
General.NET Framework version issue Pin
Ruchi Gupta6-Apr-04 13:30
Ruchi Gupta6-Apr-04 13:30 
GeneralRe: .NET Framework version issue Pin
Heath Stewart7-Apr-04 3:18
protectorHeath Stewart7-Apr-04 3:18 
GeneralRe: .NET Framework version issue Pin
Ruchi Gupta7-Apr-04 4:52
Ruchi Gupta7-Apr-04 4:52 
GeneralRe: .NET Framework version issue Pin
Heath Stewart7-Apr-04 5:11
protectorHeath Stewart7-Apr-04 5:11 
GeneralRe: .NET Framework version issue Pin
Ruchi Gupta7-Apr-04 5:53
Ruchi Gupta7-Apr-04 5:53 
GeneralRe: .NET Framework version issue Pin
Heath Stewart7-Apr-04 6:54
protectorHeath Stewart7-Apr-04 6:54 
GeneralRSS Aggregator Pin
mil_an6-Apr-04 12:22
mil_an6-Apr-04 12:22 
Hi,

I'm trying to create a RSS News Aggregator, and this is part of code for it:

private void Page_Load(object sender, System.EventArgs e) <br />
      { <br />
         // See if the news items for this feed are in the Data Cache <br />
         string strFeedID = Request.QueryString["FeedID"]; <br />
         int feedID = 0; <br />
<br />
         if (strFeedID != null) <br />
         { <br />
            feedID = Int32.Parse(strFeedID); <br />
         } <br />
<br />
<br />
         XmlDocument feedXML = (XmlDocument) Cache["Feed" + feedID]; <br />
         if (feedXML == null) <br />
         { <br />
            // item not found in cache, get the feed details <br />
            // Connect to the Database <br />
            OleDbConnection myConnection = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Inetpub\\wwwroot\\SyndicationDemo\\RSS.mdb");          <br />
            // Retrieve the SQL query results <br />
            string SQL_QUERY = "SELECT URL, UpdateInterval FROM Feeds WHERE FeedID = @FeedID"; <br />
            OleDbCommand myCommand = new OleDbCommand(SQL_QUERY, myConnection); <br />
<br />
            OleDbParameter feedParam = new OleDbParameter("@FeedID", OleDbType.Integer, 4); <br />
            feedParam.Value = feedID; <br />
            myCommand.Parameters.Add(feedParam); <br />
<br />
            myConnection.Open(); <br />
            string feedURL = ""; <br />
            int updateInterval = 0; <br />
<br />
            OleDbDataReader reader = myCommand.ExecuteReader(CommandBehavior.CloseConnection); <br />
            reader.Read(); <br />
            try <br />
            { <br />
               feedURL = reader["URL"].ToString(); <br />
               updateInterval = Int32.Parse(reader["UpdateInterval"].ToString()); <br />
            } <br />
            catch <br />
            { <br />
               feedURL = "default url"; <br />
               updateInterval = 0; // or any other default value <br />
            } <br />
            myConnection.Close(); <br />
<br />
            // Now that we have the feed URL, load it in into an XML document <br />
            feedXML = new XmlDocument(); <br />
            feedXML.Load(feedURL); <br />
<br />
            Cache.Insert("Feed" + feedID, feedXML, null, DateTime.Now.AddMinutes(updateInterval), TimeSpan.Zero); <br />
<br />
         } <br />
<br />
         xmlNewsItems.Document = feedXML; <br />
<br />
         // Add the FeedID parameter to the XSLT stylesheet <br />
         XsltArgumentList xsltArgList = new XsltArgumentList(); <br />
         xsltArgList.AddParam("FeedID", "", feedID); <br />
         xmlNewsItems.TransformArgumentList = xsltArgList; <br />
      } 

____________________________________________________

I am receiving this error when I try run it:

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. <br />
<br />
Exception Details: System.IO.FileNotFoundException: Could not find file "C:\WINNT\system32\default url". <br />
<br />
Source Error: <br />
<br />
<br />
Line 77:             // Now that we have the feed URL, load it in into an XML document <br />
Line 78:             feedXML = new XmlDocument(); <br />
Line 79:             feedXML.Load(feedURL); <br />
Line 80: <br />
Line 81:             Cache.Insert("Feed" + feedID, feedXML, null, DateTime.Now.AddMinutes(updateInterval), TimeSpan.Zero); <br />
<br />
<br />
Source File: c:\inetpub\wwwroot\syndicationdemo\display.aspx.cs  Line: 79 

____________________________________________

I have been racking my brain to find a solution, but haven't been able to.
Can someone out there please help me.

Your help will be greatly appreciated.
Thanks!!
GeneralRe: RSS Aggregator Pin
Heath Stewart6-Apr-04 12:32
protectorHeath Stewart6-Apr-04 12:32 
GeneralRe: RSS Aggregator Pin
mil_an6-Apr-04 12:48
mil_an6-Apr-04 12:48 
GeneralRe: RSS Aggregator Pin
Heath Stewart6-Apr-04 13:16
protectorHeath Stewart6-Apr-04 13:16 
GeneralRe: RSS Aggregator Pin
mil_an6-Apr-04 13:17
mil_an6-Apr-04 13:17 
Generalusing try,catch exceptions in a thread timer Pin
User 9625786-Apr-04 12:02
User 9625786-Apr-04 12:02 
GeneralRe: using try,catch exceptions in a thread timer Pin
Heath Stewart6-Apr-04 12:29
protectorHeath Stewart6-Apr-04 12:29 
GeneralRe: using try,catch exceptions in a thread timer Pin
User 9625786-Apr-04 15:27
User 9625786-Apr-04 15:27 
GeneralRe: using try,catch exceptions in a thread timer Pin
Roman Rodov6-Apr-04 17:14
Roman Rodov6-Apr-04 17:14 
GeneralRe: using try,catch exceptions in a thread timer Pin
User 9625786-Apr-04 19:48
User 9625786-Apr-04 19:48 
GeneralRe: using try,catch exceptions in a thread timer Pin
User 9625786-Apr-04 19:52
User 9625786-Apr-04 19:52 
GeneralRe: using try,catch exceptions in a thread timer Pin
Heath Stewart7-Apr-04 3:08
protectorHeath Stewart7-Apr-04 3:08 
GeneralRe: using try,catch exceptions in a thread timer Pin
User 9625787-Apr-04 6:56
User 9625787-Apr-04 6:56 
GeneralListView with GroupView enabled and thousands of items Pin
georgestrajan6-Apr-04 11:58
georgestrajan6-Apr-04 11:58 
GeneralRe: ListView with GroupView enabled and thousands of items Pin
Heath Stewart6-Apr-04 12:27
protectorHeath Stewart6-Apr-04 12:27 
GeneralRe: ListView with GroupView enabled and thousands of items Pin
georgestrajan7-Apr-04 17:56
georgestrajan7-Apr-04 17:56 
GeneralRe: ListView with GroupView enabled and thousands of items Pin
Heath Stewart7-Apr-04 18:02
protectorHeath Stewart7-Apr-04 18:02 
GeneralCompare two dates. Pin
kornstyle6-Apr-04 11:34
kornstyle6-Apr-04 11:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.