1
votes

All of a sudden SEHException occurred while trying access the assembly thorugh network. Application has been deployed in server (Windows server 2003) and running in .NET Framework 1.1 and windows C# application.Its been deployed and running well for quite long time.Below is the stack trace of the exception

*'System.Runtime.InteropServices.SEHException' occurred and was caught. ------------------------------------------------------------------------------------------- 06/13/2013 12:41:19 Type : System.Runtime.InteropServices.SEHException mscorlib
Version=2.0.0.0 Culture=neutral PublicKeyToken=b77a5c561934e089 Message : External component has thrown an exception. Source : mscorlib Help link : ErrorCode : -2147467259 Data : System.Collections.ListDictionaryInternal Stack Trace : at System.Reflection.Assembly._GetResource(String resourceName UInt64& length StackCrawlMark& stackMark Boolean skipSecurityCheck) at System.Reflection.Assembly.GetResource(String resourceName UInt64& length StackCrawlMark& stackMark Boolean skipSecurityCheck) at System.Reflection.Assembly.GetManifestResourceStream(String name
StackCrawlMark& stackMark Boolean skipSecurityCheck) at System.Reflection.Assembly.GetManifestResourceStream(Type type String name Boolean skipSecurityCheck StackCrawlMark& stackMark) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture Boolean createIfNotExists Boolean tryParents) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture Boolean createIfNotExists Boolean tryParents) at System.Resources.ResourceManager.InternalGetResourceSet(CultureInfo culture Boolean createIfNotExists Boolean tryParents) at System.Resources.ResourceManager.GetObject(String name CultureInfo culture Boolean wrapUnmanagedMemStream) at System.Resources.ResourceManager.GetObject(String name) at shoppingcartBO.messageLabel_Paint(Object sender PaintEventArgs e)
at System.Windows.Forms.Control.OnPaint(PaintEventArgs e) at System.Windows.Forms.Label.OnPaint(PaintEventArgs e) at System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e
Int16 layer Boolean disposeEventArgs) at System.Windows.Forms.Control.WmPaint(Message& m) at System.Windows.Forms.Control.WndProc(Message& m) at System.Windows.Forms.Label.WndProc(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd
Int32 msg IntPtr wparam IntPtr lparam)*

The issue did not occur after closing and relaunching the application. We are getting this issue reported almost over 200 times now, and we need to solve it.

1
What is your code that is causing this error or that you suspect causing the issue?Joe W
It might not be a code issue, because the code is running well for quite sometime in production. All of a sudden this issue occurred.TRK

1 Answers

0
votes

In our case this problem was caused by following:

  1. Application was launched from network share from remote computer
  2. Client computer was put to sleep with application running
  3. Application on network share was updated to new exe file
  4. Cient computer was resumed. Application was still running with old (cached in memory) version of the exe. After that, some action in application initiated the call of Assembly.GetManifestResourceStream which resulted in SEHException

We fixed this with reorganizing the application so that this situation does not occur.