The error message just isn’t helpful

on Tuesday, June 16, 2009

(Heads Up: This is not my code. I’m trying to help out.)

In our systems there is a web application (not website) which has an automated Cruise Control (ccnet) build. And that ccnet build has worked for a couple of weeks until I added a  new webpage.

Unfortunately, once I added the webpage to the build I started to receive this error  from the asp compiler (when I removed the webpage the error went away):

/Announcements/ArchiveFeed.aspx(2): error ASPPARSE: Could not load type 'ArchiveFeed'.


I looked at both the aspx and aspx.cs file which created the error and could not understand why the error message was being generated:



ArchiveFeed.aspx:



<?xml version='1.0' encoding = 'utf-8'?>
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ArchiveFeed.aspx.cs" Inherits="ArchiveFeed" Title="Announcement Archives" %>

<rows>
<page>1</page>
<total>2</total>
<records>15</records >

<asp:Repeater ID="repeater1" runat="server">

<HeaderTemplate>
</HeaderTemplate>

<ItemTemplate>
<row id='<%# DataBinder.Eval(Container.DataItem, "Id") %>'>
<cell><%# DataBinder.Eval(Container.DataItem, "Id") %></cell>
<cell><%# DataBinder.Eval(Container.DataItem, "Subject") %></cell>
<cell><%# DataBinder.Eval(Container.DataItem, "Message") %></cell>
<cell><%# DataBinder.Eval(Container.DataItem, "Editor") %></cell>
<cell><%# DataBinder.Eval(Container.DataItem, "Tr") %></cell>
</row>
</ItemTemplate>

<FooterTemplate>
</FooterTemplate>

</asp:Repeater>

</rows>


 



ArchiveFeed.aspx.cs:



using System;
using System.Collections;
using System.Web.UI;
using Ucsb.Sa.Registrar.Herald;
using Ucsb.Sa.Registrar.Herald.Services;


public partial class ArchiveFeed : Page
{
private AnnouncementService _servAnnounce = AppSettings.GetAnnouncementService();
private ArrayList list1 = new ArrayList();
protected void Page_Load(object sender, EventArgs e)
{
/*if (Session["validated"] == null || !Session["validated"].Equals("true"))
{
Response.Redirect("Login.aspx");
}*/
Response.ContentType = "text/xml";
AnnouncementList aList = _servAnnounce.getAllAnnouncements();
for (int i = 0; i < aList.Announcements.Count; i++)
list1.Add(new ArchiveInformation(aList.Announcements[i].ID,aList.Announcements[i].Subject,aList.Announcements[i].Message,
aList.Announcements[i].Editor,aList.Announcements[i].ActiveTimeRange));
//lists.Add(aList.Announcements[i].ID);
this.repeater1.DataSource = list1;
this.repeater1.DataBind();
}
}



After asking some of the other developers in the department about the problem, a unanimous conclusion was made: “That’s just weird”. So what the heck is going on?



Any help would be appreciated.



UPDATE: The code behind for the page wasn't able to compile because a referenced assembly wasn't updated in the source control system. I have become too reliant on the source control system's Visual Studio integration.

0 comments:

Post a Comment


Creative Commons License
This site uses Alex Gorbatchev's SyntaxHighlighter, and hosted by herdingcode.com's Jon Galloway.