hm, looks like code snuck into the 1.1.13 branch that enabled the 2.0
configuration classes.

Attached is a diff that should do away with that error.  I haven't
committed it to svn yet, though.

Chris

On Mon, 2006-03-13 at 21:00 -0500, Abe Gillespie wrote:
> Thanks Chris.  That helped me get a little farther.  How 'bout this one?:
> 
> Npgsql.NpgsqlException: System.TypeInitializationException: An
> exception was thrown by the type initializer for System.Net.Dns --->
> System.InvalidCastException: Cannot cast from source type to
> destination type.
> in <0x000a3> System.Net.Sockets.Socket:CheckProtocolSupport ()
> in <0x00007> System.Net.Dns:.cctor ()--- End of inner exception stack trace 
> ---
> 
> in <0x00000> <unknown method>
> in <0x0002b> Npgsql.NpgsqlClosedState:ResolveIPHost (System.String HostName)
> in <0x00065> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnector
> context) ---> System.TypeInitializationException: An exception was
> thrown by the type initializer for System.Net.Dns --->
> System.InvalidCastException: Cannot cast from source type to
> destination type.
> in <0x000a3> System.Net.Sockets.Socket:CheckProtocolSupport ()
> in <0x00007> System.Net.Dns:.cctor ()--- End of inner exception stack trace 
> ---
> 
> in <0x00000> <unknown method>
> in <0x0002b> Npgsql.NpgsqlClosedState:ResolveIPHost (System.String HostName)
> in <0x00065> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnector
> context)--- End of inner exception stack trace ---
> 
> in <0x0057c> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnector context)
> in <0x000c4> Npgsql.NpgsqlConnector:Open ()
> in <0x0022e> Npgsql.NpgsqlConnectorPool:GetPooledConnector
> (Npgsql.NpgsqlConnection Connection)
> 
> Thanks again for any help.
> -Abe
> 
> On 3/13/06, Chris Toshok <[EMAIL PROTECTED]> wrote:
> > This was due to a change to the 2.0 machine.config file in 1.1.13.  The
> > attached patch (which has been committed to the 1.1.13 branch) should
> > fix it for you.
> >
> > Chris
> >
> > On Mon, 2006-03-13 at 17:30 -0500, Abe Gillespie wrote:
> > > I'm getting the following when trying to load a page.  I'm running
> > > Mono 1.1.13.4 and xsp2:
> > >
> > > Npgsql.NpgsqlException: System.TypeInitializationException: An
> > > exception was thrown by the type initializer for System.Net.Dns --->
> > > System.Configuration.ConfigurationException: system.net/settings does
> > > not implement System.Configuration.IConfigurationSectionHandler ()
> > > in <0x000e1> System.Web.Configuration.ConfigurationData:CreateNewHandler
> > > (System.String sectionName, System.Web.Configuration.SectionData
> > > section)
> > > in <0x001d1> System.Web.Configuration.ConfigurationData:GetHandler
> > > (System.String sectionName)
> > > in <0x00055> System.Web.Configuration.ConfigurationData:GetHandler
> > > (System.String sectionName)
> > > in <0x00026> System.Web.Configuration.ConfigurationData:GetConfigInternal
> > > (System.String sectionName, System.Web.HttpContext context, Boolean
> > > useLoc)
> > > in <0x00072> 
> > > System.Web.Configuration.ConfigurationData:GetConfigOptLocation
> > > (System.String sectionName, System.Web.HttpContext context, Boolean
> > > useLoc)
> > > in <0x00276> System.Web.Configuration.ConfigurationData:GetConfig
> > > (System.String sectionName, System.Web.HttpContext context)
> > > in <0x0005a> System.Web.Configuration.WebDefaultConfig:GetConfig
> > > (System.String sectionName, System.Web.HttpContext context)
> > > in <0x00022> System.Web.Configuration.WebDefaultConfig:GetConfig
> > > (System.String sectionName)
> > > in <0x0001a> System.Configuration.ConfigurationSettings:GetConfig
> > > (System.String sectionName)
> > > in <0x00091> System.Net.Sockets.Socket:CheckProtocolSupport ()
> > > in <0x00007> System.Net.Dns:.cctor ()--- End of inner exception stack 
> > > trace ---
> > >
> > > in <0x00000> <unknown method>
> > > in <0x0002b> Npgsql.NpgsqlClosedState:ResolveIPHost (System.String 
> > > HostName)
> > > in <0x00065> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnector
> > > context) ---> System.TypeInitializationException: An exception was
> > > thrown by the type initializer for System.Net.Dns --->
> > > System.Configuration.ConfigurationException: system.net/settings does
> > > not implement System.Configuration.IConfigurationSectionHandler ()
> > > in <0x000e1> System.Web.Configuration.ConfigurationData:CreateNewHandler
> > > (System.String sectionName, System.Web.Configuration.SectionData
> > > section)
> > > in <0x001d1> System.Web.Configuration.ConfigurationData:GetHandler
> > > (System.String sectionName)
> > > in <0x00055> System.Web.Configuration.ConfigurationData:GetHandler
> > > (System.String sectionName)
> > > in <0x00026> System.Web.Configuration.ConfigurationData:GetConfigInternal
> > > (System.String sectionName, System.Web.HttpContext context, Boolean
> > > useLoc)
> > > in <0x00072> 
> > > System.Web.Configuration.ConfigurationData:GetConfigOptLocation
> > > (System.String sectionName, System.Web.HttpContext context, Boolean
> > > useLoc)
> > > in <0x00276> System.Web.Configuration.ConfigurationData:GetConfig
> > > (System.String sectionName, System.Web.HttpContext context)
> > > in <0x0005a> System.Web.Configuration.WebDefaultConfig:GetConfig
> > > (System.String sectionName, System.Web.HttpContext context)
> > > in <0x00022> System.Web.Configuration.WebDefaultConfig:GetConfig
> > > (System.String sectionName)
> > > in <0x0001a> System.Configuration.ConfigurationSettings:GetConfig
> > > (System.String sectionName)
> > > in <0x00091> System.Net.Sockets.Socket:CheckProtocolSupport ()
> > > in <0x00007> System.Net.Dns:.cctor ()--- End of inner exception stack 
> > > trace ---
> > >
> > > in <0x00000> <unknown method>
> > > in <0x0002b> Npgsql.NpgsqlClosedState:ResolveIPHost (System.String 
> > > HostName)
> > > in <0x00065> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnector
> > > context)--- End of inner exception stack trace ---
> > >
> > > in <0x0057c> Npgsql.NpgsqlClosedState:Open (Npgsql.NpgsqlConnector 
> > > context)
> > > in <0x000c4> Npgsql.NpgsqlConnector:Open ()
> > > in <0x0022e> Npgsql.NpgsqlConnectorPool:GetPooledConnector
> > > (Npgsql.NpgsqlConnection Connection)
> > >
> > > Thanks for any help.
> > > -Abe
> > > _______________________________________________
> > > Mono-list maillist  -  [email protected]
> > > http://lists.ximian.com/mailman/listinfo/mono-list
> >
> >
> >
Index: Socket.cs
===================================================================
--- Socket.cs	(revision 57938)
+++ Socket.cs	(working copy)
@@ -716,16 +716,11 @@
 			}
 
 			if(ipv6Supported == -1) {
-#if NET_2_0 && CONFIGURATION_DEP
-				SettingsSection config;
-				config = (SettingsSection) System.Configuration.ConfigurationSettings.GetConfig("system.net/settings");
-				ipv6Supported = config.Ipv6.Enabled ? -1 : 0;
-#else
 				NetConfig config = (NetConfig)System.Configuration.ConfigurationSettings.GetConfig("system.net/settings");
 
 				if(config != null)
 					ipv6Supported = config.ipv6Enabled?-1:0;
-#endif
+
 				if(ipv6Supported != 0) {
 					try {
 						Socket tmp = new Socket(AddressFamily.InterNetworkV6, SocketType.Stream, ProtocolType.Tcp);
_______________________________________________
Mono-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-list

Reply via email to