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:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\dubs_test\4fc875e9\c05ca91a\App_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:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\dubs_test\4fc875e9\c05ca91a\App_Web_dataentry.aspx.cdcab7d2.v9c2efde.0.cs:0 __ASP.FastObjectFactory_app_web_dataentry_aspx_cdcab7d2_v9c2efde.Create_ASP_dataentry_aspx() in c:\WINDOWS\Microsoft.NET\Framework64\v2.0.50727\Temporary ASP.NET Files\dubs_test\4fc875e9\c05ca91a\App_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
please make sure you have same database objects, configuration settings in both test and production server.
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