Could Not Load Type "<<name>>" Error

D

Don Wash

Hi All!

I'm getting the following 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 'WebChartTest.WebForm1'.

No DLLs has been compiled yet and nothing in the \bin directory. So it is
not the versioning problem or anything like that.

And here are the source of the files...

-------------START "WebForm1.aspx"-------------

<%@ Register TagPrefix="cr" Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="WebChartTest.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<CR:CrystalReportViewer id='CrystalReportViewer1' runat='server'
style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 56px"
Height="50px" Width="350px"></CR:CrystalReportViewer>
</form>
</body>
</HTML>

-------------END "WebForm1.aspx"-------------

-------------START "WebForm1.aspx.vb"-------------

Imports System
Imports System.Web
Imports System.Web.UI

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents CrystalReportViewer1 As
CrystalDecisions.Web.CrystalReportViewer

'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CrystalReportViewer1.ReportSource = "CrystalReport1.rpt"
End Sub

End Class


-------------END "WebForm1.aspx.vb"-------------

I've also removed the Global.asax file and ran it, the error is the same. So
the error is not in the Global.asax file.

I've also tried replacing the ( Inherits="WebChartTest.WebForm1" ) with (
Inherits="WebForm1" ) in WebForm1.aspx but the error is the same. This
project sit on http://localhost/WebChartTest/

I've installed VS.NET 2003 on my computer as well as SharpDevelop RC2.

I've completely given up on the problem :( [well not completely but almost]
but I hope at least one of you can figure the problem out!

Thanks!
Don
 
M

Martin Marinov

WHen you use code behind files .net framework expects that your application
will have a dll file in your /bind directory. So when you try to start the
application .net framework throw this exception because it can not found the
needed files

So you have to rebuild your application and check ( just to be sure ) that
your .dll file is in the /bin directory

Regards
Martin
Don Wash said:
Hi All!

I'm getting the following 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 'WebChartTest.WebForm1'.

No DLLs has been compiled yet and nothing in the \bin directory. So it is
not the versioning problem or anything like that.

And here are the source of the files...

-------------START "WebForm1.aspx"-------------

<%@ Register TagPrefix="cr" Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="WebChartTest.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<CR:CrystalReportViewer id='CrystalReportViewer1' runat='server'
style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 56px"
Height="50px" Width="350px"></CR:CrystalReportViewer>
</form>
</body>
</HTML>

-------------END "WebForm1.aspx"-------------

-------------START "WebForm1.aspx.vb"-------------

Imports System
Imports System.Web
Imports System.Web.UI

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents CrystalReportViewer1 As
CrystalDecisions.Web.CrystalReportViewer

'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CrystalReportViewer1.ReportSource = "CrystalReport1.rpt"
End Sub

End Class


-------------END "WebForm1.aspx.vb"-------------

I've also removed the Global.asax file and ran it, the error is the same. So
the error is not in the Global.asax file.

I've also tried replacing the ( Inherits="WebChartTest.WebForm1" ) with (
Inherits="WebForm1" ) in WebForm1.aspx but the error is the same. This
project sit on http://localhost/WebChartTest/

I've installed VS.NET 2003 on my computer as well as SharpDevelop RC2.

I've completely given up on the problem :( [well not completely but almost]
but I hope at least one of you can figure the problem out!

Thanks!
Don
 
D

Don Wash

Hi Martin!

Thanks for the reply! I didn't know it is compusalary to complie the files
first in order to run ASPX pages with code behind?

For example, the following code runs fine without any compilation to DLL

-------------------CodeBehind.aspx---------------------

<%@ Page Inherits="CBPage" Src="CodeBehind.aspx.vb" %>

<html>
<head>
<title>In-Page Coding Style</title>
</head>
<body>

<h2 id="header" runat="server" />
<hr />

<form runat="Server">
<asp:TextBox id="nameInput" runat="server" />
<asp:Button id="submit" OnClick="submit_click" runat="server" />
</form>

<asp:Label id="postBack" runat="server" />

</body>
</html>
-------------------END CodeBehind.aspx---------------------

-------------------CodeBehind.aspx.vb---------------------

Option Strict Off

Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

Public Class CBPage : Inherits Page

Public nameInput As TextBox
Public header As HtmlGENERICcONTROL
Public submit As Button
Public postBack As Label

Sub Page_Load(sender As Object, e As EventArgs)

If Page.IsPostBack = False Then

submit.Text = "Click Me"
Header.innerHtml = "In-Page Coding Style Web Form"

End If

End Sub

Sub submit_Click(sender As Object, e As EventArgs)

postBack.Text = "WOW! You Clicked Me " & nameInput.Text & "!"

End Sub

End Class

-------------------END CodeBehind.aspx.vb---------------------

Any Ideas Why?

Don

Martin Marinov said:
WHen you use code behind files .net framework expects that your application
will have a dll file in your /bind directory. So when you try to start the
application .net framework throw this exception because it can not found the
needed files

So you have to rebuild your application and check ( just to be sure ) that
your .dll file is in the /bin directory

Regards
Martin
Don Wash said:
Hi All!

I'm getting the following Error:



No DLLs has been compiled yet and nothing in the \bin directory. So it is
not the versioning problem or anything like that.

And here are the source of the files...

-------------START "WebForm1.aspx"-------------

<%@ Register TagPrefix="cr" Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="WebChartTest.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<CR:CrystalReportViewer id='CrystalReportViewer1' runat='server'
style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 56px"
Height="50px" Width="350px"></CR:CrystalReportViewer>
</form>
</body>
</HTML>

-------------END "WebForm1.aspx"-------------

-------------START "WebForm1.aspx.vb"-------------

Imports System
Imports System.Web
Imports System.Web.UI

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents CrystalReportViewer1 As
CrystalDecisions.Web.CrystalReportViewer

'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CrystalReportViewer1.ReportSource = "CrystalReport1.rpt"
End Sub

End Class


-------------END "WebForm1.aspx.vb"-------------

I've also removed the Global.asax file and ran it, the error is the
same.
So
the error is not in the Global.asax file.

I've also tried replacing the ( Inherits="WebChartTest.WebForm1" ) with (
Inherits="WebForm1" ) in WebForm1.aspx but the error is the same. This
project sit on http://localhost/WebChartTest/

I've installed VS.NET 2003 on my computer as well as SharpDevelop RC2.

I've completely given up on the problem :( [well not completely but almost]
but I hope at least one of you can figure the problem out!

Thanks!
Don
 
D

Don Wash

Anybody else out there know how to solve this problem???

Don

Don Wash said:
Hi All!

I'm getting the following 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 'WebChartTest.WebForm1'.

No DLLs has been compiled yet and nothing in the \bin directory. So it is
not the versioning problem or anything like that.

And here are the source of the files...

-------------START "WebForm1.aspx"-------------

<%@ Register TagPrefix="cr" Namespace="CrystalDecisions.Web"
Assembly="CrystalDecisions.Web, Version=9.1.5000.0, Culture=neutral,
PublicKeyToken=692fbea5521e1304" %>
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="WebForm1.aspx.vb"
Inherits="WebChartTest.WebForm1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta name="GENERATOR" content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema"
content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<CR:CrystalReportViewer id='CrystalReportViewer1' runat='server'
style="Z-INDEX: 101; LEFT: 16px; POSITION: absolute; TOP: 56px"
Height="50px" Width="350px"></CR:CrystalReportViewer>
</form>
</body>
</HTML>

-------------END "WebForm1.aspx"-------------

-------------START "WebForm1.aspx.vb"-------------

Imports System
Imports System.Web
Imports System.Web.UI

Public Class WebForm1
Inherits System.Web.UI.Page

#Region " Web Form Designer Generated Code "

'This call is required by the Web Form Designer.
<System.Diagnostics.DebuggerStepThrough()> Private Sub
InitializeComponent()

End Sub
Protected WithEvents CrystalReportViewer1 As
CrystalDecisions.Web.CrystalReportViewer

'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceholderDeclaration As System.Object

Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeComponent()
End Sub

#End Region

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
'Put user code to initialize the page here
CrystalReportViewer1.ReportSource = "CrystalReport1.rpt"
End Sub

End Class


-------------END "WebForm1.aspx.vb"-------------

I've also removed the Global.asax file and ran it, the error is the same. So
the error is not in the Global.asax file.

I've also tried replacing the ( Inherits="WebChartTest.WebForm1" ) with (
Inherits="WebForm1" ) in WebForm1.aspx but the error is the same. This
project sit on http://localhost/WebChartTest/

I've installed VS.NET 2003 on my computer as well as SharpDevelop RC2.

I've completely given up on the problem :( [well not completely but almost]
but I hope at least one of you can figure the problem out!

Thanks!
Don
 
M

Martin Marinov

Unfortunatelly after copy and paste your code i couldn't start the page,
without a compilation

Martin

Don Wash said:
Hi Martin!

Thanks for the reply! I didn't know it is compusalary to complie the files
first in order to run ASPX pages with code behind?

For example, the following code runs fine without any compilation to DLL

-------------------CodeBehind.aspx---------------------

<%@ Page Inherits="CBPage" Src="CodeBehind.aspx.vb" %>

<html>
<head>
<title>In-Page Coding Style</title>
</head>
<body>

<h2 id="header" runat="server" />
<hr />

<form runat="Server">
<asp:TextBox id="nameInput" runat="server" />
<asp:Button id="submit" OnClick="submit_click" runat="server" />
</form>

<asp:Label id="postBack" runat="server" />

</body>
</html>
-------------------END CodeBehind.aspx---------------------

-------------------CodeBehind.aspx.vb---------------------

Option Strict Off

Imports System
Imports System.Web.UI
Imports System.Web.UI.WebControls
Imports System.Web.UI.HtmlControls

Public Class CBPage : Inherits Page

Public nameInput As TextBox
Public header As HtmlGENERICcONTROL
Public submit As Button
Public postBack As Label

Sub Page_Load(sender As Object, e As EventArgs)

If Page.IsPostBack = False Then

submit.Text = "Click Me"
Header.innerHtml = "In-Page Coding Style Web Form"

End If

End Sub

Sub submit_Click(sender As Object, e As EventArgs)

postBack.Text = "WOW! You Clicked Me " & nameInput.Text & "!"

End Sub

End Class

-------------------END CodeBehind.aspx.vb---------------------

Any Ideas Why?

Don

Martin Marinov said:
WHen you use code behind files .net framework expects that your application
will have a dll file in your /bind directory. So when you try to start the
application .net framework throw this exception because it can not found the
needed files

So you have to rebuild your application and check ( just to be sure ) that
your .dll file is in the /bin directory

Regards
Martin
the
Web same.
with
(
Inherits="WebForm1" ) in WebForm1.aspx but the error is the same. This
project sit on http://localhost/WebChartTest/

I've installed VS.NET 2003 on my computer as well as SharpDevelop RC2.

I've completely given up on the problem :( [well not completely but almost]
but I hope at least one of you can figure the problem out!

Thanks!
Don
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top