在我們的開發環境系統上工作正常,但在Live系統上有時buttonClick動作會產生以下錯誤。如果我按下1-2次它的工作原理而不會產生錯誤。繼續收到「對象引用未設置爲對象的實例」。
在實時系統錯誤,它仍然顯示我的本地路徑。這可能是問題嗎? 感謝您的幫助
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.
異常詳細信息:
System.NullReferenceException: Object reference not set to an instance of an object.
源錯誤:
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.
堆棧跟蹤:
[NullReferenceException: Object reference not set to an instance of an object.] WebApplication4.orderConfirmation.SubmitButton_Click(Object sender, EventArgs e) in C:\Documents and Settings\Desktop\Purchase\WebApplication4\WebApplication4\orderConfirmation.aspx.cs:341 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +153 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3690
您是否介意發佈'SubmitButton_Click'的代碼並指出'orderConfirmation.aspx.cs'中的第341行是哪一行? – 2010-11-08 10:52:57
請詳細說明縮小錯誤的時間。有了這幾個信息,有無盡的可能原因。 順便說一句,你是本地路徑被添加,因爲它最後被編譯爲本地機器上的調試,並且您已將此.pdb文件複製到服務器,但這不會導致異常。 – 2010-11-08 10:56:22