2011-12-03 111 views
1

Parser Error部署asp.net项目时出错

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 'web1.WebForm1'.

Source Error:

Line 1: <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="web1.WebForm1" %> 
Line 2: 
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 

Source File: /kaka/web1/WebForm1.aspx Line: 1

+1

您的WebForm1.aspx.vb文件是什么样子的? – ngm

+2

您是否构建了应用程序?它是一个网站还是一个Web应用程序项目(它是否具有.vbproj文件)?到底你是如何尝试部署它的? –

+0

首先我想说的是打开autoeventwireup On,其次直到你在页面后面的代码中分享你的代码片段,这将很难找出你的问题是什么? – AnandMohanAwasthi

回答

1

根据发布的信息,这听起来像你的代码背后是畸形的。您的WebForm1.aspx.vb文件应该看起来像这样:

Namespace web1 
    Partial Public Class WebForm1 
     Inherits System.Web.UI.Page 

     Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 

     End Sub 

    End Class 
End Namespace