灰儿 发表于 2013-8-30 09:04:29

访问asp.net网页出现No relevant source lines

Server Error in '/' Application. Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.

Source Error:




Source File: c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\52fd62ac\85f99b73\App_Web_pwvd3og4.1.cs    Line: 0

Stack Trace:


   Web.UI.BasePage..ctor() in F:\2013 年 开发的系统\宿城区老干部局网站\Progect\Web.UI\BasePage.cs:14   Web.Index..ctor() +29   ASP.index_aspx..ctor() in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\52fd62ac\85f99b73\App_Web_pwvd3og4.1.cs:0   __ASP.FastObjectFactory_app_web_pwvd3og4.Create_ASP_index_aspx() in c:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root\52fd62ac\85f99b73\App_Web_pwvd3og4.10.cs:0   System.Web.Compilation.BuildResultCompiledType.CreateInstance() +32   System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +109   System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31   System.Web.UI.PageHandlerFactory.System.Web.IHttpHandlerFactory2.GetHandler(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +40   System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +167   System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +128   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +184

灰儿 发表于 2013-8-30 09:05:39

请确保在 aspx中的页面指令 Inherits属性与aspx.cs中的类一致
HTML code
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CheckBoxListDemo.aspx.cs" Inherits="CheckBoxListDemo" %>
页: [1]
查看完整版本: 访问asp.net网页出现No relevant source lines