• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 232
  • Last Modified:

Error Message: Could not load type

I have 2 web form pages. One loads without error. One displays error.  
I cannot find any difference between them.

This works:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="BestPicks.aspx.cs"
    Inherits="StockProMax.BestPicks" %>

This does not work:
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master"
    AutoEventWireup="true" CodeBehind="AlionEval.aspx.cs"
    Inherits="StockProMax.AlionEval"
    %>

Parser 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 'StockProMax.AlionEval'.

Source Error:

Line 1:  <%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master"
Line 2:      AutoEventWireup="true" CodeBehind="AlionEval.aspx.cs"
Line 3:      Inherits="StockProMax.AlionEval"
 

 Source File:  /AlionEval.aspx    Line:  1

Steps to reproduce:

http://www.stockpickermax.com/
Select Best Picks from the Features menu.
The Best Picks page opens and tells you that you must log in. This is OK.

Now select Alion Demo.
The error will display.

What should I look at?

Thanks
0
Dovberman
Asked:
Dovberman
  • 3
  • 2
1 Solution
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Check in AlionEval.aspx.cs, very likely the class is not exactly StockProMax.AlionEval.
Namespace not correct, or class name not being the same. Note that it may be a case sensitivity issue (I had that recently after copying a web page)
0
 
DovbermanAuthor Commented:
BestPicks works:

namespace StockProMax
{
    public partial class BestPicks : System.Web.UI.Page
 

AlionEval does not work:

namespace StockProMax
{
    public partial class AlionEval : System.Web.UI.Page

    {

Here is more info.

AlionEval works from localhost, but not from hosted site.

Should I copy BestPicks, rename it, and upload to the hosted site?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
Ensure that both class files match the class name and namespace
ensure you recompile full and upload the aspx and dll files.
0
 
DovbermanAuthor Commented:
The dll hint did it. I did a full recompile and manually uploaded new and changed files via ftp. However I forgot to Publish to the host.

Thanks,
0
 
DovbermanAuthor Commented:
Perfect.  Thanks.
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!

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now