[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
mono-develop 2.8.6.3.
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:DropDownList>
<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=127.0.0.1;User Id=root;Password=secret;Pooling=False"
providerName="MySql.Data.MySqlClient"/>
NB the commented code down works.
<!-- <add name="larsConnectionString" connectionString="Data
Source=192.168.0.113;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
at
System.Net.Sockets.Socket+SocketAsyncResult.CheckIfThrowDelayedException ()
[0x00000]
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: 2.10.8.1 (Debian
2.10.8.1-1~dhx1~lucid1); ASP.NET Version: 2.0.50727.1433
--
Med vänliga hälsningar/Regards
Lars Ebeling
Rentier
http://leopg9.no-ip.org
"I am not young enough to know everything."
-- Oscar Wilde
More information about the Monodevelop-list
mailing list