asp.net的Login.aspx.cs出错解决办法
2010-07-29 17:46
399 查看
帐户登录界面的文件叫Login.aspx,后台代码为Login.aspx.cs
在VS.NET 2005下测试通过,可发布后,在IIS下运行,则有如下错误提示。
Description: An error occurred during the compilation of a resource required to service this request.
Please review the following specific error details and modify your source code appropriately.
Source Error:
Warning: CS0108: 'ASP.login_aspx.ApplicationInstance' hides inherited member
'Login.ApplicationInstance'. Use the new keyword if hiding was intended.
Source Error:
Show Detailed Compiler Output:
Show Complete Compilation Source:
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
===========================================================================
这是因为.NET Framework 2.0 版中新增Login类.而我们又增加Login.aspx,就会有冲突。
解决法办:
把原来这个
public partial class Login : System.Web.UI.Page
{
...
}
改为别的,如
public partial class AccountLogin : System.Web.UI.Page
{
...
}
aspx文件里的也要改动,如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Culture="auto" UICulture="auto" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="AccountLogin" Culture="auto" UICulture="auto" %>
这样居然 就 OK 啦 ! 有点感叹 MS........
在VS.NET 2005下测试通过,可发布后,在IIS下运行,则有如下错误提示。
Description: An error occurred during the compilation of a resource required to service this request.
Please review the following specific error details and modify your source code appropriately.
[code]Line 114: public login_aspx() {Line 115: string[] dependencies;Line 116: ((Login)(this)).AppRelativeVirtualPath = "~/Login.aspx";Line 117: if ((global::ASP.login_aspx.@__initialized == false)) {Line 118: global::ASP.login_aspx.@__stringResource = this.ReadStringResource(); [/code] |
Server Error in '/' Application.
Compilation Error
Warning: CS0108: 'ASP.login_aspx.Profile' hides inherited member 'Login.Profile'. Use the new keyword if hiding was intended.Source Error:
Warning: CS0108: 'ASP.login_aspx.ApplicationInstance' hides inherited member
'Login.ApplicationInstance'. Use the new keyword if hiding was intended.
Source Error:
Show Detailed Compiler Output:
Show Complete Compilation Source:
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
===========================================================================
这是因为.NET Framework 2.0 版中新增Login类.而我们又增加Login.aspx,就会有冲突。
解决法办:
把原来这个
public partial class Login : System.Web.UI.Page
{
...
}
改为别的,如
public partial class AccountLogin : System.Web.UI.Page
{
...
}
aspx文件里的也要改动,如下:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Login" Culture="auto" UICulture="auto" %>
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="AccountLogin" Culture="auto" UICulture="auto" %>
这样居然 就 OK 啦 ! 有点感叹 MS........
相关文章推荐
- asp.net的Login.aspx.cs出错解决办法
- asp.net的Login.aspx.cs出错解决办法
- asp.net的Login.aspx.cs出错解决办法
- asp.net的Login.aspx 出错CS0030 解决办法
- ASP.NET无法打开word文档并出错解决办法
- [Javascript]关于在ASP.NET环境中调用梅花雨的日历控件出错的解决办法
- 注册asp.net 到 iis时出错中的一种的 解决办法
- CS0030: 无法将类型“ASP.login_aspx”转换为“System.Web.UI.WebControls.Login”的解决办法
- Delphi Idhttp Post提交 Aspx/Asp.net 时 500错误的解决办法。
- Delphi Idhttp Post提交 Aspx/Asp.net 时 500错误的解决办法。
- vs 开发 asp.net过程中 引用 js文件出错的解决办法
- asp.net中使用fckeditor时,提示“this connector is disabled Please check the"editor/filemanager/connectors/aspx/config.aspx”解决办法
- ASP.NET---Login.aspx和.Net 2.0冲突解决方法
- 常见ASP.NET高试出错信息及解决办法
- 常见ASP.NET高试出错信息及解决办法
- Asp.net Core 1.1 升级后操作mysql出错的解决办法
- Asp.net出错提示"无法找到脚本"/aspnet_client/syste..."解决办法
- asp.net 迅雷等下载工具会将文件取为 .aspx/.ashx等文件名的解决办法
- ASP.NET 在IIS操作WORD文档出错的解决办法
- Delphi Idhttp Post提交 Aspx/Asp.net 时 500错误的解决办法。