[MonoDevelop] Also newbie

Lars Ebeling lars.ebeling at leopg9.no-ip.org
Wed Mar 21 16:59:54 UTC 2012

Dear all,

I lifted a small application from MS VS 2010 to Ubuntu 10.04 and 
On MS I connected to a SqlServer database, this still works on mono-develop, 
but I want to get rid of the MS connection.
 In Default.aspx I have a DropDownlist which I want to fill from the 
database. You find codesnippets below.

<form runat="server">

<asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True"

DataSourceID="SqlDataSource1" DataTextField="Ã"mne" DataValueField="FID">


<asp:SqlDataSource ID="SqlDataSource1" runat="server"

ConnectionString="<%$ ConnectionStrings:larsConnectionString %>"

SelectCommand="SELECT * FROM [my_forum]"></asp:SqlDataSource>

>From web.config

<add name="larsConnectionString" connectionString="Initial Catalog=lars;Data 
Source=;User Id=root;Password=secret;Pooling=False"


NB the commented code down works.

<!-- <add name="larsConnectionString" connectionString="Data 
Source=;Initial Catalog=lars;User ID=lars;Password=secret"

providerName="System.Data.SqlClient" /> -->

This is what I get when I run Debug in monodevelop

Server Error in '/' Application

Connection refused

Description: HTTP 500. Error processing request.

Stack Trace:

System.Net.Sockets.SocketException: Connection refused

System.Net.Sockets.Socket+SocketAsyncResult.CheckIfThrowDelayedException () 
in <filename unknown>:0

  at System.Net.Sockets.Socket.EndConnect (IAsyncResult result) [0x00000] in 
<filename unknown>:0

  at Mono.Data.Tds.Protocol.TdsComm..ctor (System.String dataSource, Int32 
port, Int32 packetSize,
Int32 timeout, TdsVersion tdsVersion) [0x00000] in <filename unknown>:0

Version information: Mono Runtime Version: (Debian; ASP.NET Version: 2.0.50727.1433

Med vänliga hälsningar/Regards
Lars Ebeling


"I am not young enough to know everything."
-- Oscar Wilde

More information about the Monodevelop-list mailing list