Windows应用程序启动错误exception代码:0xe0434352

我是启动Windows应用程序然后应用程序未启动。

错误exception代码: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() 

不是我通常要处理的任务,但我会假设某种缺失的依赖或错误配置。 这是以前答案的重演。

这是一个比下面的列表更广泛的范围检查列表: EXE文件不起作用 (推荐脱脂)。 也许先尝试下面的问题。


发射时崩溃

这只是一个凌乱的列表,旨在激发调试思路。 如果您发现不准确,请改进内联。

许多事情可能会导致应用程序在启动时崩溃。 我怀疑列出的所有问题都会导致崩溃,而是错误消息。 另外: 几个点重叠很多

  • 依赖性问题 :丢失文件和运行时 – 以及注册(也许是驱动程序?)。 程序集绑定问题(GAC,清单)。
  • 配置问题 :配置文件中指定的错误路径或URL(通常来自开发人员计算机)。 甚至是错误的许可证文件或解密密钥(参见其他要点 – 许多重叠)。
  • 编码问题 :仅提及ANSI / Unicode,加密/解密,压缩/解压缩等潜在问题。 路径名中有非法字符?
  • 许可问题 :许可证无效或与许可服务器无连接。 基本上是配置问题,但将其列为自己的问题。 也可能与网络有关。
  • 硬件/驱动程序问题 :如果无法连接到硬件(驱动程序问题),我看到应用程序崩溃。 这是条形码阅读器应用程序吗? 它需要连接设备吗? 也许司机老了,或者更糟:实验。 (您的exe被称为POSBarcode.exe表示与硬件设备的通信?)。
  • 平台和位置问题 :例如混合x86,x64文件。 应用程序无法在虚拟机上运行? 应用程序只能在嵌入式设备上运行? 我在这里不稳定。 只需列出想到的一切。 膨胀的清单,没有定论。
  • 权限问题 :某种权限被拒绝。
    • 许可问题可以看起来像行为被拒绝(没有适当的警告)。
    • 缺少NTFS权限 (文件,文件夹,共享,注册表)。
    • 缺乏NT特权
    • 数据库连接的 身份validation授权问题。
    • 阻止安全软件 (防病毒,防火墙)。
    • 缺少AD组成员资格组策略干扰
    • 代码访问安全问题? (不应该崩溃,应该吗?我知道CAS已经改变了很多,我没有达到速度)。
  • 不知道是否列出网络问题 (没有连接,代理失败等等), 加密问题 (应用程序没有解密它收到的gobbledigook),如果系统时钟错误,某些应用程序甚至可能拒绝启动(我想防止错误的日期和时间进入数据库), 本地化问题 ?, 操作系统版本或版本等等……

总体问题 :您是否作为有效用户在具有所需运行时的当前和最新的计算机上启动必要的AD组成员身份和许可证,并且您与安全软件的工作网络连接暂时被禁用以进行测试?


以下是原始答案。


依赖性和错误配置

一系列具体问题:

  • 可调试性 :Visual Studio?
    • 这是您自己的应用程序,因此您可以获得源代码吗?
    • 如果是这样,它是否在调试模式下Visual Studio中正常运行
  • 依赖关系 :您是否测试了基本的,所需的运行时组件/条件的存在?
    • 您是否尝试首先在另一台计算机上运行相关应用程序? 干净的虚拟机,测试服务器,测试工作站和SOE机器? 您是否使用与在开发箱上使用的用户凭据相同的用户凭据进行测试?
    • 目标计算机开发人员 计算机架构是否相同? 您的目标CPU是什么? 目标计算机有什么特别之处吗? 它有奇怪的政策吗? 是否有安全软件阻止事情? 它是否缺少开发计算机上安装的公共运行时组件 ? ( .NETVC++ runtimeVC runtimejava等)。
    • 如果它在Visual Studio中工作,请尝试使用modules view来了解项目以交互方式加载的内容: Debug => Start Debugging ,然后转到Debug => Windows => Modules 。 它应该显示加载的任何内容以交互方式运行项目。 识别后,将发布文件夹中缺少的内容复制到位。
    • 您是否使用Dependencies.exe等工具进行基本依赖性检查? ( 直接链接到发布标签 )。
    • 还有老化和过时的Dependency Walker ,它具有分析function(启动EXE和监视器依赖性)。 这是一个C ++应用程序,而不是上面提到的C# / C应用程序Dependencies.exe 。 它缺乏处理高级function,如并排组件和API集。
    • Fuslogvw.exe报告什么? (.NET程序集绑定失败)。
    • 如何确定.NET应用程序的依赖项? (仅供参考)。
  • 配置 :您的清单文件或其他设置文件中是否有问题? 似乎可能基于日志。
    • 路径 :指向源层次结构中的文件夹的某些相对路径在发布模式下不出现在普通框中? 硬编码的开发框参考指向发布系统上缺少的资源无法访问的网络位置
    • 文件 :可能缺少资源文件吗? (图像,dll等……)。 也许只是一个图像文件或某种设置文件完全丢失?
    • 进程监控 :这些是procmon.exe会话可以帮助揭示的内容。 原始样本使用

链接 (基本上只用于保管):

  • 复制到另一个位置时C#Debug文件夹不运行exe 。
  • 如何确定.NET应用程序的依赖项?
  • 在Visual Studio 2017中为WPF应用程序创建MSI安装程序后,EXE不执行任何操作
  • 使用Wix Msi安装程序在安装后将CPP dll注册到COM中
  • 如何找到.exe和.msi(安装程序)的内容之间的区别
  • EXE文件无法正常工作
  • 如何使用exception代码修复在启动时崩溃的.NET Windows应用程序:0xE0434352?