Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

New to C# Getting Parsing Error on RSS feed

Posted on 2006-06-27
4
Medium Priority
?
512 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 1500 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

Independent Software Vendors: 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

Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

715 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