Windows Application running on remote SQL Server DB

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Locked
Ankit
Newbie
Newbie
Posts: 2
Joined: Wed Nov 07, 2012 2:24 am

Windows Application running on remote SQL Server DB

Post by Ankit »

Hi,
I have a Windows Application which is running on SQL Server. This SQL Server is located on a remote machine (connected in Intranet).

I am able to run a Simple Windows Application without Database. But when I am running the Windows Application with SQL Server as Backend, it is giving me the following Error.


System.Net.Sockets.SocketException: No such host is known
at System.Net.Dns.hostent_to_IPHostEntry (System.String h_name, System.String[] h_aliases, System.String[] h_addrlist) [0x00000]
at System.Net.Dns.GetHostByName (System.String hostName) [0x00000]
at System.Net.Dns.GetHostEntry (System.String hostNameOrAddress) [0x00000]
at System.Net.Dns.GetHostAddresses (System.String hostNameOrAddress) [0x00000]
at System.Net.Sockets.UdpClient.Connect (System.String hostname, Int32 port) [0x00000]
at System.Net.Sockets.UdpClient..ctor (System.String hostname, Int32 port) [0x00000]
at System.Data.SqlClient.SqlConnection+SqlMonitorSocket..ctor (System.String ServerName, System.String InstanceName) [0x00000]
at System.Data.SqlClient.SqlConnection.DiscoverTcpPortViaSqlMonitor (System.String ServerName, System.String InstanceName) [0x00000]
at System.Data.SqlClient.SqlConnection.ParseDataSource (System.String theDataSource, System.Int32& thePort, System.String& theServerName) [0x00000]
at System.Data.SqlClient.SqlConnection.Open () [0x00000]
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataTable dataTable, IDbCommand command, CommandBehavior behavior) [0x00000]
at System.Data.Common.DbDataAdapter.Fill (System.Data.DataTable dataTable) [0x00000]
at (wrapper remoting-invoke-with-check) System.Data.Common.DbDataAdapter:Fill (System.Data.DataTable)
at WindowsFormsApplication2.WM5951DataSetTableAdapters.WMCustomerTableAdapter.Fill (WindowsFormsApplication2.WMCustomerDataTable dataTable) [0x00000]
at WindowsFormsApplication2.Form1.Form1_Load (System.Object sender, System.EventArgs e) [0x00000]
at System.Windows.Forms.Form.OnLoad (System.EventArgs e) [0x00000]
at System.Windows.Forms.Form.OnLoadInternal (System.EventArgs e) [0x00000]

The Windows Application have been developed using .Net Framework 2.0.
I have tried the Winetricks jet40 and even MDAC28. Then also the same error persists.
Even ping and nmap are working.

Can anybody help me out with this issue.
Thanx in Advance.
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Re: Windows Application running on remote SQL Server DB

Post by DanKegel »

What host is it trying to resolve?

Can you configure the app to connect with an IP address rather than a hostname? That would
work around broken DNS.

Are you using mono, or real .net? There's some chance real .net could work around this,
or at least make the name being resolved show up in a WINEDEBUG=+wininet,+winsock
log.

If all else fails, you could use a tool like strace, process explorer, or wireshark to
see what hostname it's trying to look up.
Ankit
Newbie
Newbie
Posts: 2
Joined: Wed Nov 07, 2012 2:24 am

Re: Windows Application running on remote SQL Server DB

Post by Ankit »

Hi DanKegel,
First of all thanx for support.

Our's is a Company and all our PC's are connected in Intranet.
Ofcourse I am trying to connect with the help of IP Address. Here is the connection string that I am using to connect to SQL Server DB.

<add name="WindowsFormsApplication2.Properties.Settings.WM5951ConnectionString" connectionString="Data Source=192.168.1.77\SQLEXPRESS2008R2;Initial Catalog=WM5951;User ID=SUPERVISOR;Password=DEMO" providerName="System.Data.SqlClient"/>


I am making use of mono. Actually I am a beginner on Wine as well as on Ubuntu.
I have also tried disabling the Firewall.

I have never used strace, process explorer or wireshark and I dont even know how to use. :)
Aaron9615
Level 2
Level 2
Posts: 17
Joined: Wed Jun 13, 2012 9:46 am

Re: Windows Application running on remote SQL Server DB

Post by Aaron9615 »

Do you happen to know if your SQL server is running in mixed mode or Windows authentication?
User avatar
DanKegel
Moderator
Moderator
Posts: 1164
Joined: Wed May 14, 2008 11:44 am

Re: Windows Application running on remote SQL Server DB

Post by DanKegel »

Maybe a tiny example would help.

Can you throw together a ten line .net program that connects to a dummy database
and see if that reproduces the problem?

If so, please post the example source and binary here, along with the steps needed to
reproduce the problem. Ideally it would show how to set up the dummy database
from scratch (on windows), too, using some trial version of the database.
Locked