[Mono-dev] WebRequest/Configuration bug in 2.0

John Luke john.luke at gmail.com
Fri Jun 9 12:28:25 EDT 2006


Hello,

It seems that if you have a .config file for your app containing dllmaps
creating a WebRequest will fail.  I think it is specific to 2.0
configuration stuff. (Originally found by trying to use the banshee
podcast plugin).  Let me know if you want it in bugzilla instead.

Unhandled Exception: System.TypeInitializationException: An exception
was thrown by the type initializer for System.Net.WebRequest --->
System.Configuration.ConfigurationErrorsException: Unrecognized
configuration section <dllmap> ()
(/usr/local/etc/mono/2.0/machine.config line 2)
  at System.Configuration.ConfigInfo.ThrowException (System.String text,
System.Xml.XmlTextReader reader) [0x00000]
  at System.Configuration.SectionGroupInfo.ReadContent
(System.Xml.XmlTextReader reader, System.Configuration.Configuration
config, Boolean overrideAllowed, Boolean root) [0x00000]
  at System.Configuration.SectionGroupInfo.ReadRootData
(System.Xml.XmlTextReader reader, System.Configuration.Configuration
config, Boolean overrideAllowed) [0x00000]
  at System.Configuration.Configuration.ReadConfigFile
(System.Xml.XmlTextReader reader, System.String fileName) [0x00000]
  at System.Configuration.Configuration.Load () [0x00000]
  at System.Configuration.Configuration.Init (IConfigSystem system,
System.String configPath, System.Configuration.Configuration parent)
[0x00000]
  at System.Configuration.Configuration..ctor
(System.Configuration.InternalConfigurationSystem system, System.String
locationSubPath) [0x00000]
  at System.Configuration.InternalConfigurationFactory.Create
(System.Type typeConfigHost, System.Object[]
hostInitConfigurationParams) [0x00000]
  at
System.Configuration.ConfigurationManager.OpenExeConfigurationInternal
(ConfigurationUserLevel userLevel, System.Reflection.Assembly
calling_assembly, System.String exePath) [0x00000]
  at
System.Configuration.ClientConfigurationSystem.System.Configuration.Internal.IInternalConfigSystem.GetSection (System.String configKey) [0x00000]
  at System.Configuration.ConfigurationManager.GetSection (System.String
sectionName) [0x00000]
  at System.Net.WebRequest..cctor () [0x00000] --- End of inner
exception stack trace ---
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.cs
Type: text/x-csharp
Size: 607 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20060609/933e748c/attachment.bin 
-------------- next part --------------
<configuration>
	<dllmap dll="libglib-2.0.so" target="libglib-2.0.so.0" />
	<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0" />
	<dllmap dll="libgtk-win32-2.0-0.dll" target="libgtk-x11-2.0.so.0" />
	<dllmap dll="libbonobo-2.so" target="libbonobo-2.so.0" />
	<dllmap dll="gdk-x11-2.0" target="libgdk-x11-2.0.so.0" />
	<dllmap dll="libbanshee" target="/usr/local/lib/banshee/libbanshee.so" />
	<dllmap dll="libX11" target="libX11.so.6" />
</configuration>


More information about the Mono-devel-list mailing list