2012-02-29 68 views
0

當我將我的項目傳輸到服務器時,我現在收到此錯誤消息。這是什麼意思,我該如何解決?無法加載aspx頁面的繼承類

Server Error in '/HD' Application. 

    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 'HD._Default'. 

    Source Error: 


    Line 1: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="HD._Default" %> 
    Line 2: 
    Line 3: <%@ Register Assembly="FormControls" Namespace="FormControls" TagPrefix="FC" %> 

    Source File: /helpdeskform/HD/default.aspx Line: 1 
+0

您是如何將項目轉移到服務器的? – Oded 2012-02-29 20:38:57

回答

1

@Page指令包含此屬性:Inherits="HD._Default"

這意味着在與此頁面關聯的HD名稱空間中有一個類_Default

該錯誤表示無法找到該類。

修復程序取決於網站是如何設置和部署:

  • 您可以通過該類複製到正確的位置
  • 使用Visual Studio部署工具解決這個(右鍵單擊Web項目,然後部署)

我更喜歡使用部署工具 - 您可以部署到本地文件夾以確保所有依賴關係存在,然後上傳到服務器(如果您不舒服或無法使用直接服務器選項)。

+0

我沒有包含名稱_default的文件,並且啓用隱藏文件夾爲可見。另外,我右鍵點擊了我的項目,沒有「部署」選項。我確實有'構建部署包'選項 – jsmith 2012-02-29 20:50:19

+0

@jsmith - 您使用的是VS的哪個版本?你有沒有嘗試構建部署包? – Oded 2012-02-29 20:51:22

+0

我正在使用Visual Studio 2010.我選擇了構建部署包並沒有得到任何錯誤 – jsmith 2012-03-01 18:15:35