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.as px.cs" Inherits="UberAspNet.RSS.N ewsWire" 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.Out putStream, Encoding.UTF8);
objX.WriteStartDocument();
objX.WriteStartElement("rs s");
objX.WriteAttributeString( "version", "2.0");
objX.WriteStartElement("ch annel");
objX.WriteElementString("t itle", "uberASP.Net NewsWire");
objX.WriteElementString("l ink","http://www.uberasp.net/newswire.aspx");
objX.WriteElementString("d escription ","The latest headlines and articles from the world of ASP.NET, Microsoft's
objX.WriteElementString("c opyright", "(c) 2004, POP World Media, LLC. All rights reserved.");
objX.WriteElementString("t tl","5");
SqlConnection objConnection = new SqlConnection(Configuratio nSettings. AppSetting s["MyConne ctionStrin g"]);
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("it em");
objX.WriteElementString("t itle",objR eader.GetS tring(0));
objX.WriteElementString("d escription ",objReade r.GetStrin g(1));
objX.WriteElementString("l ink","http://www.uberasp.net/GetArticle.aspx?id=" + objReader.GetInt32(2).ToSt ring());
objX.WriteElementString("p ubDate", objReader.GetDateTime(3).T oString("R "));
objX.WriteEndElement();
}
objReader.Close();
objConnection.Close();
objX.WriteEndElement();
objX.WriteEndElement();
objX.WriteEndDocument();
objX.Flush();
objX.Close();
Response.End();
}
}
}
any help is appreciated
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.as
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.Out
objX.WriteStartDocument();
objX.WriteStartElement("rs
objX.WriteAttributeString(
objX.WriteStartElement("ch
objX.WriteElementString("t
objX.WriteElementString("l
objX.WriteElementString("d
objX.WriteElementString("c
objX.WriteElementString("t
SqlConnection objConnection = new SqlConnection(Configuratio
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("it
objX.WriteElementString("t
objX.WriteElementString("d
objX.WriteElementString("l
objX.WriteElementString("p
objX.WriteEndElement();
}
objReader.Close();
objConnection.Close();
objX.WriteEndElement();
objX.WriteEndElement();
objX.WriteEndDocument();
objX.Flush();
objX.Close();
Response.End();
}
}
}
any help is appreciated
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
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
ASKER
Anybody?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
AT