Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=77562 --- shadow/77562 2006-02-20 14:19:22.000000000 -0500 +++ shadow/77562.tmp.20585 2006-03-02 18:38:35.000000000 -0500 @@ -10,13 +10,12 @@ Component: XSP AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] QAContact: [EMAIL PROTECTED] TargetMilestone: --- URL: -Cc: Summary: Missing interface implementation Cannot connect to database form ASP.NET page. There is a small test code (I tried with FirebirdClient Beta 2, FirebirdNETProvider1.7, MySQL Connector/.NET 1.0.7): @@ -179,6 +178,161 @@ Syd.Interface.Web.HttpHandlers.VirtualPageFactory:GetHandler (System.Web.HttpContext context, System.String requestType, System.String virtualPath, System.String path) in <0x001e9> System.Web.HttpApplication:GetHandler (System.Web.HttpContext context) in <0x00bc1> System.Web.HttpApplication+<Pipeline>__4:MoveNext () + +------- Additional Comments From [EMAIL PROTECTED] 2006-03-02 18:38 ------- +Hello, + +I appear to be experiencing the same issue reported in this bug, when +connecting to MySQL. + +Strangely, connections fail within a System.Web.UI.Page, but not from +within a System.Console app. + +Everything used to work in the past (< 1.1.11ish), but trying out +1.1.13.2 and 1.1.13.4 I am able to reproduce the issue. + +I am testing on a Suse 9.3 install, using gmcs and mod-mono-server2.exe. + +Without even executing a query, the sample code below throws an +exception. To test, change the connection string to point to a valid + MySQL DB and compile with gmcs. + +MySQLTest.aspx +-------------- +<%@ Page Language="C#" AutoEventWireup="true" +Codebehind="MySQLTest.aspx.cs" Inherits="MySQLTest" %> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" +"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + +<html xmlns="http://www.w3.org/1999/xhtml" > +<head runat="server"> + <title>MySQL Test</title> +</head> +<body> + <form id="form1" runat="server"> + <div> + </div> + </form> +</body> +</html> + + +MySQLTest.aspx.cs +----------------- +using System; +using System.Data; +using System.Configuration; +using System.Collections; +using System.Web; +using System.Web.Security; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Web.UI.WebControls.WebParts; +using System.Web.UI.HtmlControls; +using ByteFX.Data.MySqlClient; + +public partial class MySQLTest : System.Web.UI.Page +{ + + protected void Page_Load(object sender, EventArgs e) + { + MysqlTest(); + } + + private void MysqlTest() + { + string connectionString = +@"Server=xxx.xxx.xxx.xxx;Database=xxxxxx;User ID=xxxxx;Password=xxxxxxxx"; + + MySqlConnection myConn = new MySqlConnection(connectionString); + try + { + myConn.Open(); + myConn.Close(); + } + catch (Exception ex) + { + throw ex; + } + } +} + + +System.Console Test (works) +--------------------------- +using System; +using System.Data; +using ByteFX.Data.MySqlClient; + +public class MySQLTest +{ + public static void Main(string[] args) + { + string connectionString = +@"Server=xxx.xxx.xxx.xxx;Database=xxxxxx;User ID=xxxxx;Password=xxxxxxxx"; + MySqlConnection myConn = new MySqlConnection(connectionString); + myConn.Open(); + myConn.Close(); + } +} + + +Stack Trace (MySQLTest.aspx) +---------------------------- +ByteFX.Data.MySqlClient.MySqlException: Unable to connect to any of +the specified MySQL hosts ---> 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 <0x000a5> System.Net.Sockets.Socket:CheckProtocolSupport () +in <0x00007> System.Net.Dns:.cctor ()--- End of inner exception stack +trace --- + +in <0x00000> <unknown method> +in <0x0016b> ByteFX.Data.Common.StreamCreator:GetStream (Int32 timeOut) +in <0x00081> ByteFX.Data.MySqlClient.Driver:Open +(ByteFX.Data.MySqlClient.MySqlConnectionString settings)--- End of +inner exception stack trace --- + +in <0x000d1> ByteFX.Data.MySqlClient.Driver:Open +(ByteFX.Data.MySqlClient.MySqlConnectionString settings) +in <0x00035> ByteFX.Data.MySqlClient.MySqlInternalConnection:Open () +in <0x000a2> +ByteFX.Data.MySqlClient.MySqlPool:CreateNewPooledConnection () +in <0x00184> ByteFX.Data.MySqlClient.MySqlPool:GetPooledConnection () +in <0x0003f> ByteFX.Data.MySqlClient.MySqlPool:GetConnection () +in <0x000cb> ByteFX.Data.MySqlClient.MySqlPoolManager:GetConnection +(ByteFX.Data.MySqlClient.MySqlConnectionString settings) +in <0x00057> ByteFX.Data.MySqlClient.MySqlConnection:Open () + +Let me know if there is any additional info. I might be able to provide. + +Thanks! + _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
