Hi Guys! I have came this far with my first web application just to be stopped at the provider door step. Please help me get through if you can.
I have build my first web application according on your ASP.NET 1.1 with
VB.NET 2003 and it runs fine in Visual Studio but when I have uploaded all the files from project called Resume2 to the wwwRoot directory of â
www.henrysresume.comâ at my provider site and access the site from internet I am getting the error below:
Parser Error Message: Could not load type 'Resume2.Global'.
Source Error:
Line 1: <%@ Application Codebehind="Global.asax.
vb" Inherits="Resume2.Global" %>
Source File: C:\Accounts\henrysre\wwwRoot\global.asax Line: 1
Version Information: Microsoft .NET Framework Version:1.1.4322.2300; ASP.NET Version:1.1.4322.2300
However, the Globa.asax file code doesnât have a code line outlined in the Error message. Below is the pageâs code.
Imports System.Web
Imports System.Web.Security
Imports System.Web.SessionState
Imports System.Data.OleDb
Public Class Global
Inherits System.Web.HttpApplication
#Region " Component Designer Generated Code "
Public Sub New()
MyBase.New()
'This call is required by the Component Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'Required by the Component Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Component Designer
'It can be modified using the Component Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
components = New System.ComponentModel.Container
End Sub
#End Region
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
Application("iVisitCur") = 0
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session is started
Session("FullRegistry") = False
'Declare the database access objects
Dim UsersDr As OleDbDataReader
Dim UsersConn As OleDbConnection
Dim UsersCmd As OleDbCommand
'Declare the connection string that grants access to the database
Dim Conn As String = ConfigurationSettings.AppSettings("ConnectionStrin g")
'Declare the SQL that will be executed. tblApplicLog AplTotVisits
Dim SQL As String = "SELECT AplTotVisits FROM tblApplicLog"
'Open the connection to the database.
UsersConn = New OleDbConnection(Conn)
UsersCmd = New OleDbCommand(SQL, UsersConn)
UsersConn.Open()
UsersDr = UsersCmd.ExecuteReader(CommandBehavior.CloseConnec tion)
If UsersDr.Read Then
Application("iVisitTot") = UsersDr("AplTotVisits")
Application("iLastVisitTot") = UsersDr("AplTotVisits")
End If
UsersDr.Close()
End Sub
Sub Application_BeginRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires at the beginning of each request
End Sub
Sub Application_AuthenticateRequest(ByVal sender As Object, ByVal e As EventArgs)
' Fires upon attempting to authenticate the use
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Fires when an error occurs
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the session ends
Application("iVisitCur") = Application("iVisitCur") - 1
If Application("iVisitCur") < 0 Then Application("iVisitCur") = 0
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
' Fires when the application ends
Dim queryString As String
Dim data As New DataSet
Dim dbConnection As OleDbConnection
Dim dataAdapter As OleDbDataAdapter
Dim connectionString As String = ConfigurationSettings.AppSettings("ConnectionStrin g")
queryString = "SELECT * FROM tblApplicLog"
dbConnection = New OleDbConnection(connectionString)
dataAdapter = New OleDbDataAdapter(queryString, dbConnection)
dataAdapter.Fill(data, "tblApplicLog")
Dim table As DataTable
table = data.Tables("tblApplicLog")
Dim selectedRows() As DataRow
'selectedRows = table.Select("Pass = '" & sPassword & "'")
selectedRows(0).Item("AplTotVisits") = Application("iVisitTot")
'generate the Update command
Dim commandBuilder As OleDbCommandBuilder
commandBuilder = New OleDbCommandBuilder(dataAdapter)
dataAdapter.UpdateCommand = commandBuilder.GetUpdateCommand
'Update the data store
dataAdapter.Update(data, "tblApplicLog")
dbConnection.Close()
End Sub
End Class
I have tried to get some advice from the providerâs support staff but the best they could offer was to âtroubleshooting the application code for errorsâ.
Could you give me direction how to correct this problem keeping in mind that this is first web application done by ex VB6 programmer.
Many thanks in advance
Henry