Solved

New to C# Getting Parsing Error on RSS feed

Posted on 2006-06-27
4
511 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 10

Expert Comment

by:athapa
ID: 16998383
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
ID: 16998813
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
ID: 17010284
Anybody?
0
 
LVL 10

Accepted Solution

by:
athapa earned 500 total points
ID: 17024210
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

635 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