我在IIS 5.1下面调试一个主页,但是提示为如下
ServerErrorin'/WebApp'Application.ParserErrorDescription:Anerroroccurredduringthepars...
Server Error in '/WebApp' 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 '_Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
本人OS是XPSP2,安装有"IIS5.1"、.NET Framework 2.0 用vs 2005编写的页面 展开
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 '_Default'.
Source Error:
Line 1: <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
Line 2:
Line 3: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
本人OS是XPSP2,安装有"IIS5.1"、.NET Framework 2.0 用vs 2005编写的页面 展开
1个回答
展开全部
检查下页面和后台代码的namespace是否一致
例如:你Default.aspx.cs文件中有:
namespace Test
{
public partial class _Default : System.Web.UI.Page
{.....
}
}
那么Default.aspx总:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Test._Default" %>
例如:你Default.aspx.cs文件中有:
namespace Test
{
public partial class _Default : System.Web.UI.Page
{.....
}
}
那么Default.aspx总:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Test._Default" %>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询