0

ASP.Net で Web アプリを作成しています。

私が持っているWebページの上部に:

    <%@ Page Language="VB" AutoEventWireup="false" CodeFile="software-mgr.aspx.vb" Inherits="ftp_access_software_mgr" EnableViewState="True" EnableSessionState="True" %>
<% 
    Dim ssMgr As SoftwareFTPStorage = New SoftwareFTPStorage
    Dim ssDBMgr As SoftwareStoreDBTools = New SoftwareStoreDBTools
    Dim username As String
    username = getUserName()

    If Not IsPostBack Then buildDBList()

%>

.aspx.vb ページには次のものがあります。

Imports SoftwareFTPStorage
Imports SoftwareStoreDBTools
Imports System
Imports System.Security
Imports System.Data.SqlClient
Imports System.Data.SqlClient.SqlConnection
Imports System.Data.SqlClient.SqlCommand

Partial Class ftp_access_software_mgr
    Inherits System.Web.UI.Page

    Dim ssDBTools As SoftwareStoreDBTools = New SoftwareStoreDBTools
    Dim ssMgrTools As SoftwareFTPStorage = New SoftwareFTPStorage

    Protected Sub Add_Click(sender As Object, e As System.EventArgs) Handles AddButton.Click
        ...Class Code
    End Sub

    Protected Sub RemButton_Click(sender As Object, e As System.EventArgs) Handles RemButton.Click
        ...Class Code
    End Sub

    Protected Sub buildDBList()
        ...Class Code
    End Sub

    Protected Function getUserName() As String
        ...Class Code
    End Function

End Class

何をしたかわかりませんが、サーバーのある時点でエラーが発生し始めました:

    Compilation Error 
    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

Compiler Error Message: BC30002: Type 'SoftwareStoreDBTools' is not defined.

Source Error:

Line 10:     Inherits System.Web.UI.Page
Line 11: 
Line 12:     Dim ssDBTools As SoftwareStoreDBTools = New SoftwareStoreDBTools
Line 13:     Dim ssMgrTools As SoftwareFTPStorage = New SoftwareFTPStorage
Line 14: 

ローカルでデバッグするとうまくいきます...まあ、まあ、まだいくつかの「状態」の問題を解決していますが、少なくともエラーページは表示されません。

何か案は?

4

1 に答える 1

0

これを確認して、それがどうなるか教えてください:

http://forums.asp.net/t/1566777.aspx/1?class+in+App_code+not+defined+

http://p2p.wrox.com/asp-net-2-0-professional/64463-classes-app_code-not-defined.html

于 2012-07-31T22:34:23.287 に答える