[Mono-dev] Unhandled Exception: System.TypeInitializationException

srinin srinivas.nangunoori at ironmountain.com
Thu Oct 21 02:25:23 EDT 2010


Hi all

When i am running our application in Mono we are getting following
exception. Kindly help me in resolving this issue. 

Unhandled Exception: System.TypeInitializationException: An exception was
thrown
 by the type initializer for
Imd.Gryphon.Agents.BackgroundAgent.BackgroundAgent
---> System.TypeInitializationException: An exception was thrown by the type
ini
tializer for Imd.Core.LogImpl.Log4NetLogFactory --->
System.Configuration.Config
urationErrorsException: Configuration system failed to initialize --->
System.Co
nfiguration.ConfigurationErrorsException: An error occurred loading a
configurat
ion file: Couldn't impersonate token. --->
System.Security.SecurityException: Co
uldn't impersonate token.
  at System.Security.Principal.WindowsImpersonationContext..ctor (IntPtr
token)
[0x00000] in <filename unknown>:0
  at System.Security.Principal.WindowsIdentity.Impersonate (IntPtr
userToken) [0
x00000] in <filename unknown>:0
  at System.Configuration.ClientConfigurationHost.Impersonate () [0x00000]
in <f
ilename unknown>:0
  at System.Configuration.BaseConfigurationRecord.Impersonate () [0x00000]
in <f
ilename unknown>:0
  at System.Configuration.BaseConfigurationRecord.InitConfigFromFile ()
[0x00000
] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Configuration.ConfigurationSchemaErrors.ThrowIfErrors (Boolean
ignor
eLocal) [0x00000] in <filename unknown>:0
  at System.Configuration.BaseConfigurationRecord.ThrowIfParseErrors
(System.Con
figuration.ConfigurationSchemaErrors schemaErrors) [0x00000] in <filename
unknow
n>:0
  at System.Configuration.BaseConfigurationRecord.ThrowIfInitErrors ()
[0x00000]
 in <filename unknown>:0
  at System.Configuration.ClientConfigurationSystem.EnsureInit
(System.String co
nfigKey) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at System.Configuration.ClientConfigurationSystem.EnsureInit
(System.String co
nfigKey) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Imd.Core.LogManager.GetLogFactory (System.Type type) [0x00000] in
<filename
 unknown>:0
  at Imd.Core.LogManager.GetLog (System.Type type) [0x00000] in <filename
unknow
n>:0
  at Imd.Gryphon.Agents.BackgroundAgent.BackgroundAgent..cctor () [0x00000]
in <
filename unknown>:0
  --- End of inner exception stack trace ---
  at Imd.Gryphon.Agents.BackgroundAgent.Program.Main () [0x00000] in
<filename u
nknown>:0
-- 
View this message in context: http://mono.1490590.n4.nabble.com/Unhandled-Exception-System-TypeInitializationException-tp3005077p3005077.html
Sent from the Mono - Dev mailing list archive at Nabble.com.


More information about the Mono-devel-list mailing list