尝试访问ASP.NET密码恢复页面时解析错误? [英] Parser error when trying to access the ASP.NET password recovery page?

查看:126
本文介绍了尝试访问ASP.NET密码恢复页面时解析错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试访问我的ASP.NET密码恢复页,我得到以下错误:

When I try to access my ASP.NET password recovery page, I get the following 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.

分析器错误信息:未能加载
  类型'RugbyClubWebApplication.ForgotPassword'。

Parser Error Message: Could not load type 'RugbyClubWebApplication.ForgotPassword'.

源错误:

Line 1:  <%@ Page Language="C#" MasterPageFile="~/SubMaster.Master" AutoEventWireup="true" CodeBehind="ForgotPassword.aspx.cs" Inherits="RugbyClubWebApplication.ForgotPassword" Title="Untitled Page" %>
Line 2:  <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
Line 3:  </asp:Content>

源文件:/Rugby/ForgotPassword.aspx线路:1。

Source File: /Rugby/ForgotPassword.aspx Line: 1

任何想法?

推荐答案

假设这是一个ASP.NET 2.0网站项目和类名和文件名是正确的,你应该尝试更换 codeBehind codeFILE 属性 @Page 指令属性代替。在.NET 2.0及以上, codeBehind 属性存在只是为了向后兼容,你应该使用 codeFILE 继承沿属性与类名一起指定隐藏文件一个code。

Assuming this to be an ASP.NET 2.0 Website project and that the class name and file names are correct, you should try replacing the CodeBehind attribute of the @Page directive with the CodeFile attribute, instead. In .NET 2.0 and above, the CodeBehind attribute exists only for backward compatibility and you should be using the CodeFile attribute along with the Inherits to specify a code behind file along with class name.

这篇关于尝试访问ASP.NET密码恢复页面时解析错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆