با عرض سلام و ادب خدمت اساتید محترم من یه پروژه روی هاست upload کردم که این خطا رو میده Object reference not set to an instance of an object.
زمانی که همین پروژه روی از vs اجرا میشه هیچ خطایی نداره
توضیحات بیشتر به این شکله:
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:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[NullReferenceException: Object reference not set to an instance of an object.]
DataClassesDataContext..ctor() +55
ASP.default_aspx..ctor() +26
__ASP.FastObjectFactory_app_web_default_aspx_cdcab7d2.Create_ASP_default_aspx() +20
System.Web.Compilation.BuildResultCompiledType.CreateInstance() +31
System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp) +100
System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +31
System.Web.UI.PageHandlerFactory.GetHandler(HttpContext context, String requestType, String virtualPath, String path) +37
System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +339
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +155
ممنون میشم راهنمایی کنید که به خطا برسم
stack Trace خود را با فرمت کد قرار دهید تا خوانایی بهتری داشته باشد.
Elmah را روی پروژه نصب کنید تا جزئیات بیشتری از خطا بدست بیارید
هیچ کاربری تا کنون از این پست تشکر نکرده است
با ما تماس بگیرید تا در این مسیر همراهتان باشیم :)