[MonoDevelop] [Mono SqlClient Data Provider] SqlException: Timeout expired

Francisco Figueiredo Jr. francisco at npgsql.org
Thu Sep 8 16:14:46 EDT 2011


What mono version are you using?

I had similar problems with mono 2.10.2, on osx, but it is fixed in 2.10.4
and above.

I hope it helps.


On Mon, Sep 5, 2011 at 18:09, <steffen-winkler at gmx.de> wrote:

> Hi,
>
> today I got the task to test a C#/.NET program with/under mono(develop).
> After everything seemd to work well (the application compiled in monodevelop
> without errors and it even started without problems) I got a database
> connection error, I've tried several thinks to get around this (used IP
> adress, used hostname, used different types of connectionstrings and so on)
> I'm now at a point where I'm clueless. I hope that *someone* is able to
> figure out why mono won't connect to that database.
>
> First some infos about the server:
> It's a Microsoft SQL 2008 server with user id/password login. The default
> connection string (which works fine under .NET/Visual Studio) is this:
> "connect timeout=10;user id=username;data
> source=servername\\instancename;password=password;persist security
> info=true;initial catalog=dbname"
>
> note that the data source is escaped (\\).
>
> With mono I tried the following connection strings aside from the default
> string:
> "Database=dbname;Server=servername\\instancename;User
> ID=username;Password=password;"
>
> "Database=dbname;Server=servername\\instancename;uid=username;pswd=password;"
>
> I always get the following error:
> Programm : Mono SqlClient Data Provider
> Prozedur : Open
> Meldung  : System.Data.SqlClient.SqlException: Timeout expired. The timeout
> period elapsed prior to completion of the operation or the server is not
> responding. ---> Mono.Data.Tds.Protocol.TdsTimeoutException: Timeout
> expired. The timeout period elapsed prior to completion of the operation or
> the server is not responding.
>  at Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource, Int32
> port, Int32 packetSize, Int32 timeout, TdsVersion tdsVersion) [0x00105] in
> C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.4\mcs\class\Mono.Data.Tds\Mono.Data.Tds.Protocol\TdsComm.cs:117
>  --- End of inner exception stack trace ---
>  at System.Data.SqlClient.SqlConnection.Open () [0x00155] in
> C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.4\mcs\class\System.Data\System.Data.SqlClient\SqlConnection.cs:554
>  at Projectname.nameOfCsharpClassFile.Initialize
> (System.Windows.Forms.ComboBox& uSelection, System.Windows.Forms.ComboBox&
> uBereich) [0x000fa] in D:\nameOfCsharpClassFile:58
> Datentyp : System.Data.SqlClient.SqlConnection
> Konvent. : Standard, HasThis
> Stack    :   at System.Data.SqlClient.SqlConnection.Open () [0x00155] in
> C:\cygwin\tmp\monobuild\build\BUILD\mono-2.10.4\mcs\class\System.Data\System.Data.SqlClient\SqlConnection.cs:554
>   at ProjectName.nameOfCsharpClassFile.Initialize
> (System.Windows.Forms.ComboBox& uSelection, System.Windows.Forms.ComboBox&
> uBereich) [0x000fa] in D:\nameOfCsharpClassFile:58
> Void Open()
> Attribute:Public, Virtual, HideBySig
> Stack Filename  : D:\nameOfCsharpClassFile
> Stack Linenumber: 73
> Stack Method    : Void Initialize(System.Windows.Forms.ComboBox ByRef,
> System.Windows.Forms.ComboBox ByRef)
>
> line 58: con.Open();
>
>
> --
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
>
>
> --
> NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie!
> Jetzt informieren: http://www.gmx.net/de/go/freephone
> _______________________________________________
> Monodevelop-list mailing list
> Monodevelop-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/monodevelop-list
>



-- 
Regards,

Francisco Figueiredo Jr.
Npgsql Lead Developer
http://www.npgsql.org
http://gplus.to/franciscojunior
http://fxjr.blogspot.com
http://twitter.com/franciscojunior
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/monodevelop-list/attachments/20110908/3f3a54b3/attachment-0001.html 


More information about the Monodevelop-list mailing list