Solved

New to C# Getting Parsing Error on RSS feed

Posted on 2006-06-27
4
504 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
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

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

Suggested Solutions

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

809 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