Link to home
Start Free TrialLog in
Avatar of chateaumiller
chateaumiller

asked on

New to C# Getting Parsing Error on RSS feed

Please Help, I'm having problems with Uber RSS:

Here's the error:

Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type 'UberAspNet.RSS.NewsWire'.

Source Error:


Line 1:  <%@ Page Codebehind="journalFeed.aspx.cs" Inherits="UberAspNet.RSS.NewsWire" EnableViewState="false" %>
Line 2:  <%@ OutputCache Duration="300" VaryByParam="none" %>

Here's the C#:

using System;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using System.Web;
using System.Xml;

namespace UberAspNet.RSS
{
      public class NewsWire : System.Web.UI.Page
      {
            private void Page_Load(object sender, System.EventArgs e)
            {
                  Response.Clear();
                  Response.ContentType = "text/xml";
                  XmlTextWriter objX = new XmlTextWriter(Response.OutputStream, Encoding.UTF8);
                  objX.WriteStartDocument();
                  objX.WriteStartElement("rss");
                  objX.WriteAttributeString("version","2.0");
                  objX.WriteStartElement("channel");
                  objX.WriteElementString("title", "uberASP.Net NewsWire");
                  objX.WriteElementString("link","http://www.uberasp.net/newswire.aspx");
                  objX.WriteElementString("description","The latest headlines and articles from the world of ASP.NET, Microsoft's
                  objX.WriteElementString("copyright","(c) 2004, POP World Media, LLC. All rights reserved.");
                  objX.WriteElementString("ttl","5");
                  SqlConnection objConnection = new SqlConnection(ConfigurationSettings.AppSettings["MyConnectionString"]);
                  objConnection.Open();
                  string sql = "SELECT TOP 10 journal_id, [fname] & "" "" & [lname] as author, journal, entry_date FROM ubbt_journals ORDER BY entry_date DESC";
                  SqlCommand objCommand = new SqlCommand(sql, objConnection);
                  SqlDataReader objReader = objCommand.ExecuteReader();
                  while (objReader.Read())
                  {
                        objX.WriteStartElement("item");
                        objX.WriteElementString("title",objReader.GetString(0));
                        objX.WriteElementString("description",objReader.GetString(1));
                        objX.WriteElementString("link","http://www.uberasp.net/GetArticle.aspx?id=" + objReader.GetInt32(2).ToString());
                        objX.WriteElementString("pubDate", objReader.GetDateTime(3).ToString("R"));
                        objX.WriteEndElement();
                  }
                  objReader.Close();
                  objConnection.Close();

                  objX.WriteEndElement();
                  objX.WriteEndElement();
                  objX.WriteEndDocument();
                  objX.Flush();
                  objX.Close();
                  Response.End();
            }
      }
}





any help is appreciated
Avatar of athapa
athapa

Did you have dll file required by the class uberASP.Net NewsWire in your bin folder or at the GAC?

AT
Avatar of chateaumiller

ASKER

Sorry if I seem stupid about this as I am going off of a posted article, but.....
The article said nothing about a required .dll so I have not physically posted to a bin, or the GAC

Do I need to find out what that DLL is?

CM
Anybody?
ASKER CERTIFIED SOLUTION
Avatar of athapa
athapa

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial