c# - Windows應用程序啟動錯誤異常代碼:0xe0434352
installation windows-installer (1)
不是我通常要處理的任務,但我會假設某種缺失的依賴或錯誤配置。 這是以前答案的重演。
這是一個比下面的列表更廣泛的範圍檢查列表: EXE文件不起作用 (推薦脫脂)。 也許先嘗試下面的問題。
發射時崩潰
這只是一個凌亂的列表,旨在激發調試思路。 如果您發現不准確,請改進內聯。
許多事情可能會導致應用程序在啟動時崩潰。 我懷疑列出的所有問題都會導致崩潰,而是錯誤消息。 另外: 幾個點重疊很多 。
- 依賴性問題 :缺少文件和運行時 - 以及註冊(也許是驅動程序?)。 程序集綁定問題(GAC,清單)。
- 配置問題 :配置文件中指定的錯誤路徑或URL(通常來自開發人員計算機)。 甚至是錯誤的許可證文件或解密密鑰(參見其他要點 - 許多重疊)。
- 編碼問題 :僅提及ANSI / Unicode,加密/解密,壓縮/解壓縮等潛在問題。 路徑名中有非法字符?
- 許可問題 :許可證無效或與許可服務器無連接。 基本上是配置問題,但將其列為自己的問題。 也可能與網絡有關。
-
硬件/驅動程序問題
:如果應用程序無法連接到硬件(驅動程序問題),我看到應用程序崩潰。
這是條形碼閱讀器應用程序嗎?
它需要連接設備嗎?
也許司機老了,或者更糟:實驗。
(您的exe被稱為
POSBarcode.exe
表示與硬件設備通信?)。 - 平台和位度問題 :例如混合x86,x64文件。 應用程序無法在虛擬機上運行? 應用程序只能在嵌入式設備上運行? 我在這裡不穩定。 只列出想到的一切。 膨脹的清單,沒有定論。
- 權限問題 :某種權限被拒絕。
- 不知道是否列出 網絡問題 (沒有連接,代理失敗等等), 加密問題 (應用程序沒有解密它收到的gobbledigook),如果 系統時鐘 錯誤,某些應用程序甚至可能拒絕啟動(我想防止錯誤的日期和時間進入數據庫), 本地化問題 ?, 操作系統版本或版本 等等......
總體問題 :您是否作為有效用戶在具有所需運行時的當前和最新的計算機上啟用必要的AD組成員身份和許可證,並且您與安全軟件的工作網絡連接暫時被禁用以進行測試?
以下是原始答案。
依賴性和錯誤配置
一系列具體問題:
-
可調試性
:Visual Studio?
- 這是您自己的應用程序,因此您可以獲得 源代碼 嗎?
- 如果是這樣,它是否 在調試模式下 在 Visual Studio中 正常 運行 ?
-
依賴關係
:您是否測試了基本的,必需的運行時組件/條件的存在?
- 您是否嘗試首先在另一台計算機上運行有問題的應用程序? 乾淨的虛擬機,測試服務器,測試工作站和SOE機器? 您是否使用與在開發箱上使用相同的用戶憑據進行測試?
-
目標計算機
與
開發人員
計算機
的
架構
是否相同?
您的目標
CPU
是什麼?
目標計算機有什麼特別之處嗎?
它有
奇怪的政策
嗎?
是否有
安全軟件
阻止事情?
它是否
缺少
開發計算機上安裝
的公共運行時組件
?
(
.NET
,VC++ runtime
,VC runtime
,java
等)。 -
如果它在Visual Studio中工作,請嘗試使用
modules view
來了解項目以交互方式加載的內容:Debug => Start Debugging
,然後轉到Debug => Windows => Modules
。 它應該顯示加載的任何內容以交互方式運行項目。 在識別時,將發布文件夾中缺少的內容複製到位。 - 您是否使用 Dependencies.exe 等工具進行基本依賴性檢查? ( 直接鏈接到發布標籤 )。
-
還有老化和過時的
Dependency Walker
,它具有分析功能(啟動EXE和監視器依賴項)。
這是一個C ++應用程序,而不是上面提到的
C# / C
應用程序Dependencies.exe
。 它缺乏處理高級功能,如並排組件和API集。 - Fuslogvw.exe 報告什麼? (.NET程序集綁定失敗)。
- 如何確定.NET應用程序的依賴項? (僅供參考)。
-
配置
:您的清單文件或其他設置文件中是否有問題?
似乎可能基於日誌。
- 路徑 :指向源層次結構中的文件夾的某些相對路徑在發布模式下不出現在普通框中? 硬編碼的開發框引用 指向發布系統上 缺少的資源 或 無法訪問的網絡位置 ?
- 文件 :可能 缺少資源文件 嗎? (圖像,dll等......)。 也許只是一個圖像文件或某種設置文件完全丟失?
- 進程監控 :這些是 procmon.exe 會話可以幫助揭示的內容。 原始樣本使用 。
鏈接 (基本上只用於保管):
我是啟動Windows應用程序然後應用程序無法啟動。
錯誤異常代碼:0xe0434352我從EventViewer發現以下錯誤。
Application_develop在Visual Studio 2010中,啟動錯誤
Application: POSBarcode.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.Xml.XmlException
at System.Xml.XmlTextReaderImpl.Throw(System.Exception)
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.XmlTextReader.Read()
at System.Configuration.XmlUtil..ctor(System.IO.Stream, System.String, Boolean, System.Configuration.ConfigurationSchemaErrors)
at System.Configuration.BaseConfigurationRecord.InitConfigFromFile()
Exception Info: System.Configuration.ConfigurationErrorsException
at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors(Boolean)
at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors(System.Configuration.ConfigurationSchemaErrors)
at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors()
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(System.Object, System.Configuration.Internal.InternalConfigEventArgs)
Exception Info: System.Configuration.ConfigurationErrorsException
at System.Configuration.ClientConfigurationSystem.OnConfigRemoved(System.Object, System.Configuration.Internal.InternalConfigEventArgs)
at System.Configuration.Internal.InternalConfigRoot.OnConfigRemoved(System.Configuration.Internal.InternalConfigEventArgs)
at System.Configuration.Internal.InternalConfigRoot.RemoveConfigImpl(System.String, System.Configuration.BaseConfigurationRecord)
at System.Configuration.BaseConfigurationRecord.GetSectionRecursive(System.String, Boolean, Boolean, Boolean, Boolean, System.Object ByRef, System.Object ByRef)
at System.Configuration.BaseConfigurationRecord.GetSection(System.String)
at System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection(System.String)
at System.Configuration.ConfigurationManager.GetSection(System.String)
at System.Configuration.ClientSettingsStore.ReadSettings(System.String, Boolean)
at System.Configuration.LocalFileSettingsProvider.GetPropertyValues(System.Configuration.SettingsContext, System.Configuration.SettingsPropertyCollection)
at System.Configuration.SettingsBase.GetPropertiesFromProvider(System.Configuration.SettingsProvider)
at System.Configuration.SettingsBase.GetPropertyValueByName(System.String)
at System.Configuration.SettingsBase.get_Item(System.String)
at System.Configuration.ApplicationSettingsBase.GetPropertyValue(System.String)
at System.Configuration.ApplicationSettingsBase.get_Item(System.String)
at POSBarcode.Properties.Settings.get_MotherBoardID()
at POSBarcode.Global..cctor()
Exception Info: System.TypeInitializationException
at POSBarcode.Global..ctor()
at POSBarcode.Login..ctor()
at POSBarcode.Program.Main()