[Mono-dev] Unable to work with Configuration files
vinay_rk
vinay.kashyap at ironmountain.com
Tue Oct 26 17:23:42 EDT 2010
Hi,
When I run my app (that is built using XBuild) in Mono from the command
prompt (using command Mono <exe name> ) , I always get the below error
whenever the app tries to access the config file. Basically the App is
trying to open some custom config sections.
Error:
FATAL [1 ] System.Configuration.ConfigurationErrorsException:
Configuratio
n system failed to initialize --->
System.Configuration.ConfigurationErrorsExcep
tion: An error occurred loading a configuration file: Couldn't impersonate
token
. ---> System.Security.SecurityException: Couldn'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
-Vinay
--
View this message in context: http://mono.1490590.n4.nabble.com/Unable-to-work-with-Configuration-files-tp3014524p3014524.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list