By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,190 Members | 792 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,190 IT Pros & Developers. It's quick & easy.

OutOfMemoryException loading machine.config at system boot time (RemotingConfiguration.Configure)

P: n/a
After many woes, I finally managed to get a stack dump of my System
Service (written in C#) that insists on crashing when launched at system
boot time (see below on how to get this dump - I couldn't find any info
on how to do this).
Here's the stack trace from cordbg:

[thread 0x220] Unhandled exception generated: (0x04719c94)
<System.Runtime.Remoting.RemotingException>
_className=<null>
_exceptionMethod=<null>
_exceptionMethodString=<null>
_message=(0x0471b380) ".Config file
C:\WINNT\Microsoft.NET\Framework\v1.1.4322\config\ machine.config can not
be read successfully due to exception System.OutOfMemoryException:
Exception of type System.OutOfMemoryException was thrown.."
_innerException=<null>
_helpURL=<null>
_stackTrace=(0x0471b6a0) array with dims=[48]
_stackTraceString=<null>
_remoteStackTraceString=<null>
_remoteStackIndex=0x00000000
_HResult=0x8013150b
_source=<null>
_xptrs=0x00000000
_xcode=0xe0434f4d

[007e] pop ebx
(cordbg) w
Thread 0x220 Current State:Normal
0)*
mscorlib!System.Runtime.Remoting.RemotingConfigHan dler::LoadConfigurationFromXmlFile
+007e [no source information available]
1)
mscorlib!System.Runtime.Remoting.RemotingConfigHan dler::LoadMachineConfigIfNecessary
+0091 [no source information available]
2) mscorlib!System.Runtime.Remoting.RemotingConfigura tion::Configure
+0009 [no source information available]
3) (my application)
I've had problems with starting remoting from system services before and
I've actually stopped using it because I couldn't get it to start up
successfully, but I must have left a call to
RemotingConfiguration.Configure somewhere in my code. Is this a case of
my service actually depending on another service. If so, which one would
that be and why is it causing an OutOfMemoryException when loading
machine.config???

Per Bergland
Carmenta AB

PS. Here's how to get a postmortem log from a .NET app. Should be in the
faq somewhere

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramewor k]
"DbgJITDebugLaunchSetting"=dword:00000002
"DbgManagedDebugger"="cmd /c \"C:\\Program Files\\Microsoft Visual
Studio .NET 2003\\SDK\\v1.1\\Bin\\cordbg.exe\" !a 0x%x !w !ex
c:\\temp\\cordbg.log"


In my case I just installed the .NET 1.1 SDK, so the path to cordbg is
was actually something like
C:\\Program Files\\Microsoft .NET SDK 1.1 Bin\\Bin\\cordbg.exe
Jul 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.