發佈網站報錯:Server Error in '/' Application.该如何处理
發佈網站報錯: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:
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.]
MyDbTool.ExecuteQuery(String str) in X:\App\MES\MCS1\MCS\MyDbTool.cs:95
MCS.Login.Page_Load(Object sender, EventArgs e) in X:\App\MES\MCS1\MCS\Login.aspx.cs:45
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
------解决思路----------------------
MyDbTool.cs:95
语句是什么,有对象为null
------解决思路----------------------
NullReferenceException空指针了,找Login.aspx.cs:45行,调试
------解决思路----------------------
X:\App\MES\MCS1\MCS\MyDbTool.cs:95
------解决思路----------------------
未将对象引用设置到对象实例 错误行也告诉了 跟踪看下 什么原因引起的null
程式在另一台服務器上發佈沒有問題,將它移到其他服務器上,就報這個錯。懷疑是環境沒裝好,請高手指點,感謝。
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:
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.]
MyDbTool.ExecuteQuery(String str) in X:\App\MES\MCS1\MCS\MyDbTool.cs:95
MCS.Login.Page_Load(Object sender, EventArgs e) in X:\App\MES\MCS1\MCS\Login.aspx.cs:45
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
System.Web.UI.Control.OnLoad(EventArgs e) +91
System.Web.UI.Control.LoadRecursive() +74
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2207
------解决思路----------------------
MyDbTool.cs:95
语句是什么,有对象为null
------解决思路----------------------
NullReferenceException空指针了,找Login.aspx.cs:45行,调试
------解决思路----------------------
X:\App\MES\MCS1\MCS\MyDbTool.cs:95
------解决思路----------------------
未将对象引用设置到对象实例 错误行也告诉了 跟踪看下 什么原因引起的null