2012-09-12 148 views
0

我正在将我的网站迁移到新服务器,它使用.NET,但我对该语言没有太多经验。不过,我试图寻找修复,但没有成功。有人可以帮忙吗?将网站迁移到新服务器时出现ASP.Net错误

错误:

compiler Error Message: ASPNET: Make sure that the class defined in this code file matches the 'inherits' attribute, and that it extends the correct base class (e.g. Page or UserControl).

源错误:

Line 1: <%@ Page Title="" Language="VB" MasterPageFile="~/EnjoyMaster2.master" AutoEventWireup="true" CodeFile="Default.aspx.vb" Inherits="_Default" %> 
Line 2: 
Line 3: <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"> 
+0

您需要发布代码隐藏文件以及... –

+1

您是否也移动了bin文件夹? – Shyju

+0

是这个服务器上的bin文件夹 –

回答

0

如果已经检查:继承属性的CodeFile attribut,命名空间,你仍然有问题,它可能是web.config中的问题(pageBaseType)。

<configuration> 
<appSettings> 
    ... 
</appSettings> 
<connectionStrings/> 
<system.web> 
    <pages pageBaseType="System.Web.UI.Page" /> 
... 
相关问题