已編譯的WCF應用程序將Visual Studio 2010 SP1放到服務器上,當然在第一次運行時出現了錯誤(新增內容),將堆棧跟蹤輸出到日誌文件。爲什麼堆棧跟蹤顯示我的開發文件路徑?
它看到了我的開發環境的路徑。爲什麼?這是因爲我將它部署爲與Release相比較還是有其他問題,或者我應該更仔細地輸出Stack Traces,而不管?
04/09/2012 03:58:46: Error: Object reference not set to an instance of an object. at App1.Logging.LogMessageToFile(String msg, Boolean isUsingClickOnceApp) in C:\Users\robcube\Documents\Visual Studio 2010\Projects\AppWebService\App1\Logging.cs:line 63
at App1.App1Main.ConnectWebService(String description) in C:\Users\robcube\Documents\Visual Studio 2010\Projects\AppWebService\App1\International.cs:line 40
04/09/2012 03:58:46: Error: Object reference not set to an instance of an object. at App1.App1Main.UpdateActivityLog(String data, String userName, Boolean deleteData, Int64 firstId, Int64 lastId, String changeType) in C:\Users\robcube\Documents\Visual Studio 2010\Projects\AppWebService\App1\App1Main.cs:line 641
謝謝, -Rob
「是否因爲我將它部署爲調試」 –
就像Amiram說的那樣,您看到調試路徑,因爲它是在調試中編譯的... – Chris
[Stacktrace信息保存路徑原始源代碼](http:/ /stackoverflow.com/questions/388470/stacktrace-information-preserving-paths-of-original-source) – Cocowalla