[Mono-bugs] [Bug 393904] New: SqlConnection fails to parse server instance name

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri May 23 06:14:09 EDT 2008


           Summary: SqlConnection fails to parse server instance name
           Product: Mono: Class Libraries
           Version: SVN
          Platform: Other
        OS/Version: Windows XP
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Sys.Data.SqlClient
        AssignedTo: mono-bugs at lists.ximian.com
        ReportedBy: atsushi at ximian.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---

When I try to use modern(?) SQL server connection string, with server intance
name, it fails to parse the server name:

using System;
using System.Data.SqlClient;

public class Test
        public static void Main ()
                var cs = "server=.\\sqlexpress;Integrated security=SSPI";
                var conn = new SqlConnection (cs);
                conn.Open ();


Actual result:

Unhandled Exception: System.Net.Sockets.SocketException: No such host is known
  at System.Net.Dns.GetHostByName (System.String hostName) [0x00000]
  at System.Net.Dns.Resolve (System.String hostName) [0x00000]
  at System.Net.Sockets.UdpClient.Connect (System.String hostname, Int32 port)
  at System.Net.Sockets.UdpClient..ctor (System.String hostname, Int32 port)
  at System.Data.SqlClient.SqlConnection+SqlMonitorSocket..ctor (System.String
erverName, System.String InstanceName) [0x00000]
  at System.Data.SqlClient.SqlConnection.DiscoverTcpPortViaSqlMonitor
ring ServerName, System.String InstanceName) [0x00000]
  at System.Data.SqlClient.SqlConnection.ParseDataSource (System.String
ource, System.Int32& thePort, System.String& theServerName) [0x00000]
  at System.Data.SqlClient.SqlConnection.Open () [0x00000]
  at Test.Main () [0x00000]

Expected result:

 no error.


If I replace ".\\sqlexpress" with "localhost\\sqlexpress", it still throws
NotImplementedException due to the failure on parsing server name (again).

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.

More information about the mono-bugs mailing list