Hello,
I have a peculiar problem that I'm hoping someone can help me out with.
I have a simple enough Web Application written in VB.Net via Visual
Studio 2003. It simply displays a Web Form with a label field saying
"Hello".
When I run this application interactively via Visual Studio 2003, I
have no problems. When I transfer this code to my Web Site and type in
the URL: :
http://www.certify-it.com/Test/test1.aspx , it give me 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 'Test.test1'.
Source Error:
Line 1: <%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="tes t1.aspx.vb" Inherits="Test. test1"%>
Line 2: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
Line 3: <HTML>
---------------------------------------------------------------------------------------------------------------------------
If I delete the text: Inherits="Test. test1"% , then the form
"test1.aspx " (which has the "Hello" label) comes up no problem.
It would appear that there is a problem in "Inheriting " the Class in
the Code Behind File. Has anyone had this sort of a problem
before and can help me out?
Here's the code...simple enough....
---------------------------------------------------------------------------------------------------------------------------
=============== ========
The HTML for test1.aspx
=============== ========
<%@ Page Language="vb" AutoEventWireup ="false"
Codebehind="tes t1.aspx.vb" Inherits="Test. test1"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1 </title>
<meta name="GENERATOR " content="Micros oft Visual Studio .NET 7.1">
<meta name="CODE_LANG UAGE" content="Visual Basic .NET 7.1">
<meta name="vs_defaul tClientScript" content="JavaSc ript">
<meta name="vs_target Schema"
content="http://schemas.microso ft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<form id="Form1" method="post" runat="server">
<asp:Label id="Label1" style="Z-INDEX: 101; LEFT: 200px; POSITION:
absolute; TOP: 64px" runat="server"
Width="200px">H ello</asp:Label>
</form>
</body>
</HTML>
---------------------------------------------------------------------------------------------------------------------------
=============== ===========
The Code for test1.aspx.vb
=============== ===========
Public Class test1
Inherits System.Web.UI.P age
#Region " Web Form Designer Generated Code "
'This call is required by the Web Form Designer.
<System.Diagnos tics.DebuggerSt epThrough()Priv ate Sub
InitializeCompo nent()
End Sub
Protected WithEvents Label1 As System.Web.UI.W ebControls.Labe l
'NOTE: The following placeholder declaration is required by the Web
Form Designer.
'Do not delete or move it.
Private designerPlaceho lderDeclaration As System.Object
Private Sub Page_Init(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Init
'CODEGEN: This method call is required by the Web Form Designer
'Do not modify it using the code editor.
InitializeCompo nent()
End Sub
#End Region
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
End Sub
End Class
---------------------------------------------------------------------------------------------------------------------------
=============== ===========
The Code for Web.config
=============== ===========
<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.web>
<customErrors mode="Off" />
<compilation defaultLanguage ="vb" debug="true" />
<!--
<authenticati on mode="Windows" />
-->
<authorizatio n>
<allow users="*" />
</authorization>
<trace enabled="false" requestLimit="1 0" pageOutput="fal se"
traceMode="Sort ByTime" localOnly="true " />
<!--
<sessionState
mode="InProc"
stateConnection String="tcpip=1 27.0.0.1:42424"
sqlConnectionSt ring="data
source=127.0.0. 1;Trusted_Conne ction=yes"
cookieless="fal se"
timeout="20"
/>
-->
<globalizatio n requestEncoding ="utf-8" responseEncodin g="utf-8" />
</system.web>
</configuration>
---------------------------------------------------------------------------------------------------------------------------