Unable to Run ANY ASP.NET Samples :: REALLY Frustrated!

D

Don Wash

Hi!

I'm pretty frustrated learning ASP.NET. I'm learning ASP.NET by downloading
samples from various ASP.NET websites and none of the samples worked so far.

The SAME error was shown whenever I browse and ASP.NET sample, which is...

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 'MySite.Web.TestProgram'.

So I'm getting 'Could not load type <<Class Name>>' error for any ASP.NET
applications I tried to execute. Majority of the ASP.NET samples I tried to
execute utilize Code Behind VB.NET and Custom ASP.NET controls and minority
uses C#.

I have Virtual Directory created in IIS to run the samples and it is
configured to "Run Scripts" and also configured as "Application" as well.

So what is the problem?? I've been trying this out with more than 8 ASP.NET
samples for more than 3 DAYS!!! NONE OF THEM WORKED SO FAR. PLEASE HELP!

I maybe doing something so stupid and so obvious to experienced .NET
developers, so please, help me out!

Here are my computer specific information...
- .NET Framework v1.1.4322
- Windows XP SP1
- IIS5

Don
 
S

Scott M.

How about if you tell us what samples you are trying? Have you tried the
..NET Framework SDK Quickstart Tutorial & Samples?
 
D

Don Wash

Hi Scott!

Scott M. said:
How about if you tell us what samples you are trying?

ANY ASP.NET samples that utilize Custom Controls, VB.NET Code Behinds and of
course Inheritance. The samples ranges from www.codeproject.com,
www.devx.com, www.4guysfromrolla.com, www.asp.net and many other misc
sources.

But none of them worked and I'm reciving SAME error message that is 'Could
not load type <<Class Name>>' . I mean only if .NET Compiler have been more
specific on the error, then I could be able to figure the problem out
myself.

This error particulary occur (I'm seeing patterns now) when an page
references a class in another page. And all of the samples I'm trying out
more or less have this kind of references (and inheritance!).

Any ideas why?
Have you tried the
.NET Framework SDK Quickstart Tutorial & Samples?

No, where do I get them?

Thanks,
Don
 
M

Mike Smith

have u tried creating a blank asp.net program and just testing if that runs
in the first place ?
u had IIS installed before .Net ? or after ?
 
D

Don Wash

Hi Mike,

Mike Smith said:
have u tried creating a blank asp.net program and just testing if that runs
in the first place ?

u had IIS installed before .Net ? or after ?

I installed .NET after IIS.

Don
 
M

Mike Smith

u might also wanna try and delete all the *.dll files from the \bin folder
before u rebuild the entire project.. see if that helps...
 
D

Don Wash

HI!

The samples I downloaded are not made in Visual Studio .NET so there is no
VS.NET project files included. All I did was just unzip the samples and put
them in the wwwRoot to test it. And there are no dll files included at all.

I also have been to the link you've gave me a while ago. It is the problem
with C#. But the strange thing is all of my sample (well majority of them)
are VB.NET samples. :p

What could be the problem??

Don
 
D

Don Wash

Hi!

There are no dll files included in the downloaded samples nor did I compile
them.

Don
 
M

Mike Smith

what no dll files ? could that be the problem ?
if the source code is written inline , the server side code is written in
the aspx pages itself then thats ok.. but if there is code behind pages then
it would need a dll of the precompiled code.
Since u said it wasnt done in vs.net im guessing its not using code behind
(done is web matrix ?)

hmm an issue with the reference of the global.asax perhaps ? did u try
deleting that if its not need (no codes in it)

would like to see a screen shot or the actual code.. im curious whats up
with ur sample..
 
D

Don Wash

Yep, No DLL whatsoever!

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 done most of the coding in Notepad but the samples I've downloaded from
the net may have been used VS.NET. Having said that I've installed VS.NET
2003 on my computer as well as SharpDevelop RC2.

I hope you can figure the problem out! For me, I've completely given up :(
[well not completely but almost].

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

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top