Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/csharp/307.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 出现异常感觉_C#_Windows Applications - Fatal编程技术网

C# 出现异常感觉

C# 出现异常感觉,c#,windows-applications,C#,Windows Applications,在尝试通过网络访问程序集时,突然发生了异常。应用程序已部署在服务器(Windows server 2003)中,并在.NET Framework 1.1和WindowsC应用程序中运行。它已部署并运行了相当长的时间。下面是异常的堆栈跟踪 *“System.Runtime.InteropServices.SEHException”发生并被捕获。 -----------------------------------------------------------------------------

在尝试通过网络访问程序集时,突然发生了异常。应用程序已部署在服务器(
Windows server 2003
)中,并在
.NET Framework 1.1
和Windows
C
应用程序中运行。它已部署并运行了相当长的时间。下面是异常的堆栈跟踪

*“System.Runtime.InteropServices.SEHException”发生并被捕获。 -------------------------------------------------------------------------------------------2013年6月13日12:41:19类型: System.Runtime.InteropServices.SEHException mscorlib
版本=2.0.0.0文化=中性PublicKeyToken=b77a5c561934e089 消息:外部组件引发异常。资料来源: mscorlib帮助链接:错误代码:-2147467259数据: System.Collections.ListDictionaryInternal堆栈跟踪:位于 System.Reflection.Assembly.\u GetResource(字符串resourceName UInt64& 长度堆栈爬网标记和堆栈标记布尔跳过安全性检查)位于 System.Reflection.Assembly.GetResource(字符串resourceName UInt64& 长度堆栈爬网标记和堆栈标记布尔跳过安全性检查)位于 System.Reflection.Assembly.GetManifestResourceStream(字符串名称
堆栈爬网标记和堆栈标记布尔跳过安全性检查) System.Reflection.Assembly.GetManifestResourceStream(类型字符串 名称布尔SkipSecurity检查堆栈爬网标记和堆栈标记)位于 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo 区域性布尔值createIfNotExists Boolean tryParents)位于 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo 区域性布尔值createIfNotExists Boolean tryParents)位于 System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo 区域性布尔值createIfNotExists Boolean tryParents)位于 System.Resources.ResourceManager.GetObject(字符串名CultureInfo 区域性布尔值(wrapUnmanagedMemStream)位于 位于的System.Resources.ResourceManager.GetObject(字符串名称) shoppingcartBO.messageLabel\u Paint(对象发送方PaintEventArgs e)
在System.Windows.Forms.Control.OnPaint(PaintEventArgs e)处 System.Windows.Forms.Label.OnPaint(PaintEventArgs e)位于 System.Windows.Forms.Control.PaintEventArgs处理(PaintEventArgs e
在 System.Windows.Forms.Control.WmPaint(Message&m)位于 System.Windows.Forms.Control.WndProc(Message&m)位于 System.Windows.Forms.Label.WndProc(Message&m)位于 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message&m) 在System.Windows.Forms.Control.ControlNativeWindow.WndProc(消息& m) 在System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd)中 Int32 msg IntPtr wparam IntPtr lparam)*


关闭并重新启动应用程序后,问题没有发生。现在,我们收到了超过200次关于此问题的报告,我们需要解决它。

在我们的案例中,此问题是由以下原因引起的:

  • 应用程序已从远程计算机的网络共享启动
  • 客户端计算机在应用程序运行时处于休眠状态
  • 网络共享上的应用程序已更新为新的exe文件
  • 计算机恢复正常。应用程序仍在使用旧(缓存在内存中)版本的exe运行。之后,应用程序中的一些操作启动了对
    Assembly.GetManifestResourceStream
    的调用,这导致了
    SEHException

  • 我们通过重新组织应用程序解决了这个问题,这样就不会出现这种情况。

    您的代码是什么导致了这个错误,或者您怀疑是什么导致了这个问题?这可能不是代码问题,因为代码在生产环境中运行了很长一段时间。突然,这个问题发生了。