Re: Not enough storage is available to process this command. (Exceptio
- From: jwgoerlich@xxxxxxxxx
- Date: Wed, 20 Jun 2007 04:36:12 -0700
My guess is that it is a memory allocation problem with Windows
Management Instrumentation (WMI). The code makes a managed call to WMI
(ManagementClass) for the network adapter information
(Win32_NetworkAdapter), which then gets invoked as an unmanaged COM+
call into Cimwin32.dll (InteropServices). The 0x80070008 COM
exceptions occur when the thread's local storage is exhausted.
If correct, this would explain why it occurs sporadically. There may
be a memory leak. I am not sure that this is a security issue, as
Martin Xie suggested. If it was, one would think the exception would
occur each time the code executed.
Have you tried applying .Net 2 SP1?
J Wolfgang Goerlich
Related Links:
MSDN Documentation: Win32_NetworkAdapter
http://msdn2.microsoft.com/en-us/library/aa394216(vs.80).aspx
Microsoft Article 812280, EventLogEntry Class May Cause Leaks in
Thread Local Storage and Event ID 4199 Event Log Entries
http://support.microsoft.com/kb/812280
Microsoft Article 824262, Memory Leak When You Use the
Win32_NetworkAdapter Notification Query
http://support.microsoft.com/kb/824262
On Jun 20, 6:12 am, Dan Händevik
<DanHnde...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Hi,
I have a piece of code that gives an exception in some cases. The code works
most of the time but on some installations the error occurs sometimes (once a
day or so)
The error below is thrown.
[COMException (0x80070008): Not enough storage is available to process this
command. (Exception from HRESULT: 0x80070008)]
System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32
errorCode, IntPtr errorInfo) +0
System.Management.ManagementScope.InitializeGuts(Object o) +784
System.Management.ManagementScope.Initialize() +216
System.Management.ManagementObject.Initialize(Boolean getObject) +619
System.Management.ManagementClass.GetInstances(EnumerationOptions options)
+121
System.Management.ManagementClass.GetInstances() +6
And the code that generates the exception is
ManagementClass managementClass = new ManagementClass("Win32_NetworkAdapter");
ManagementObjectCollection managementObjects = managementClass.GetInstances();
The code is running on a Windows Server 2003 R2, sp1
The error was not observed until the following patches where installed
kb935839, kb929123, kb935840.
The code is run in an asp.net environment.
Has anyone any idea about the source of the error?
What does InitializeGuts do that can result in a com exception like that
.
- Prev by Date: Re: Error: 0x800700005 access denied when creating a new task
- Next by Date: Re: CVE-2007-2229: Administrator passwords are stored somewhere?!
- Previous by thread: Re: Error: 0x800700005 access denied when creating a new task
- Next by thread: How unsafe is Outlook Express?
- Index(es):
Relevant Pages
|