Solved

New to C# Getting Parsing Error on RSS feed

Posted on 2006-06-27
4
497 Views
Last Modified: 2012-08-14
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
0
Comment
Question by:chateaumiller
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

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

AT
0
 

Author Comment

by:chateaumiller
Comment Utility
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
0
 

Author Comment

by:chateaumiller
Comment Utility
Anybody?
0
 
LVL 10

Accepted Solution

by:
athapa earned 500 total points
Comment Utility
The line1 and line2 should be in .aspx file and the c# code should be in .cs file mentioned in line1 (journalFeed.aspx.cs).

Not exactly sure how you are developing this. If you are using Visual Studio IDE then it should be easy. You just create a new ASP.NET web application and add those 2 files.

AT
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now