[Mono-devel-list] System.Configuration 2.0 got broken

Atsushi Eno atsushi at ximian.com
Sat Sep 11 06:05:54 EDT 2004


Hello Tim,

I think something in System.Configuration got broken with related to the
latest changes in that namespace. Here is an example repro. Compile it
with gmcs and run:

--------
using System;
using System.IO;
using System.Xml;

public class Test
{
        public static void Main ()
        {
                new XmlUrlResolver ().GetEntity (new Uri
("http://www.w3.org/2001/XMLSchema.xsd"), null, typeof (Stream));
        }
}

What I've got was:

$ mono sysconfig.exe

Unhandled Exception: System.TypeInitializationException: An exception
was thrown
 by the type initializer for System.Net.WebRequest --->
System.Configuration.Con
figurationException: Cannot get Type for
System.Net.Configuration.WebRequestModu
leHandler, System, Version=2.0.3600.0, Culture=neutral,
PublicKeyToken=b77a5c561
934e089()
in <0x00054> System.Configuration.ConfigurationData:CreateNewHandler
(string,Sys
tem.Configuration.SectionData)
in <0x0022f> System.Configuration.ConfigurationData:GetHandler (string)
in <0x0002a> System.Configuration.ConfigurationData:GetConfigInternal
(string)
in <0x000ae> System.Configuration.ConfigurationData:GetConfig (string)
in <0x0001f> System.Configuration.DefaultConfig:GetConfig (string)
in <0x00074> System.Configuration.ConfigurationSettings:GetConfig (string)
in <0x0002e> System.Net.WebRequest:.cctor ()
--- End of inner exception stack trace ---

in (unmanaged) System.Net.WebClient:SetupRequest (string)
in <0x0005e> System.Net.WebClient:SetupRequest (string)
in <0x00055> (wrapper remoting-invoke-with-check)
System.Net.WebClient:SetupRequ
est (string)
in <0x00020> System.Net.WebClient:DownloadData (string)
in <0x00055> (wrapper remoting-invoke-with-check)
System.Net.WebClient:DownloadD
ata (string)
in <0x0017c> System.Xml.XmlUrlResolver:GetEntity
(System.Uri,string,System.Type)

in <0x0004f> Test:Main ()

The problem does not happen when I use mcs and therefore 1.1 libraries.

Thanks,
Atsushi Eno



More information about the Mono-devel-list mailing list