Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.0k views
in Technique[技术] by (71.8m points)

Server Error in / Application in asp.net (the same code is working fine in test server)

I am getting the following error when i publish the website code.

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:

[No relevant source lines]

Source File: c:WINDOWSMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Filesdubs_test4fc875e9c05ca91aApp_Web_dataentry.aspx.cdcab7d2.v9c2efde.0.cs Line: 0

Stack Trace:

[NullReferenceException: Object reference not set to an instance of an object.] DataEntry..ctor() +96 ASP.dataentry_aspx..ctor() in c:WINDOWSMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Filesdubs_test4fc875e9c05ca91aApp_Web_dataentry.aspx.cdcab7d2.v9c2efde.0.cs:0 __ASP.FastObjectFactory_app_web_dataentry_aspx_cdcab7d2_v9c2efde.Create_ASP_dataentry_aspx() in c:WINDOWSMicrosoft.NETFramework64v2.0.50727Temporary ASP.NET Filesdubs_test4fc875e9c05ca91aApp_Web_dataentry.aspx.cdcab7d2.v9c2efde.1.cs:0 System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +146
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +62 System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig) +573
System.Web.MapHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +182 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +276

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Probably this is a problem with a path that you referencing. The paths that you provide may work on your local but not on server. Try to check your paths. Also this will help you ASP.NET Web Project Paths


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...