[Mono-list] Access MS Sql Server 2000 from ASP.NET on Linux (Mono)

Matthijs ter Woord (meddochat) meddochat@zonnet.nl
Wed, 20 Oct 2004 12:26:23 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_009E_01C4B6A0.078F7040
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi Abdeali

That error is because mono cannot resolve the dsl2 hostname. you should =
either make that possible or just use the ip address of the windows =
machine.

matthijs
  ----- Original Message -----=20
  From: Abdeali Nagarwala=20
  To: mono-list@lists.ximian.com=20
  Sent: Wednesday, October 20, 2004 12:08 PM
  Subject: [Mono-list] Access MS Sql Server 2000 from ASP.NET on Linux =
(Mono)


  Hello All,
  We are trying to connect our MS SQL Server 2000 database which is on =
Windows 2000 professional, through an ASP.NET application from Linux =
RedHat using Mono.=20
  we are getting fallowing error in the browser

  Server error in '/' application
  Description: Error processing request.

  Error Message: HTTP 500.

  Stack Trace:

  System.Net.Sockets.SocketException: No such host is known
  in <0x000a0> System.Net.Dns:GetHostByName (string)
  in <0x00079> System.Net.Dns:Resolve (string)
  in <0x0015b> Mono.Data.Tds.Protocol.TdsComm:.ctor =
(string,int,int,int,Mono.Data.Tds.Protocol.TdsVersion)
  in <0x00132> Mono.Data.Tds.Protocol.Tds:.ctor =
(string,int,int,int,Mono.Data.Tds.Protocol.TdsVersion)
  in <0x0001d> Mono.Data.Tds.Protocol.Tds70:.ctor (string,int,int,int)
  in <0x00081> (wrapper remoting-invoke-with-check) =
Mono.Data.Tds.Protocol.Tds70:.ctor (string,int,int,int)
  in <0x000ba> =
Mono.Data.Tds.Protocol.TdsConnectionPoolManager:CreateConnection =
(Mono.Data.Tds.Protocol.TdsConnectionInfo)
  in <0x00032> Mono.Data.Tds.Protocol.TdsConnectionPool:CreateConnection =
()
  in <0x00225> Mono.Data.Tds.Protocol.TdsConnectionPool:GetConnection ()
  in <0x002cc> System.Data.SqlClient.SqlConnection:Open ()
  in <0x0004f> (wrapper remoting-invoke-with-check) =
System.Data.SqlClient.SqlConnection:Open ()
  in <0x00051> TestCSonLnx.WebForm1:Page_Load (object,System.EventArgs)
  in <0x00069> (wrapper delegate-invoke) =
System.MulticastDelegate:invoke_void_object_EventArgs =
(object,System.EventArgs)
  in <0x00086> System.Web.UI.Control:OnLoad (System.EventArgs)
  in <0x00024> System.Web.UI.Control:LoadRecursive ()
  in <0x00198> System.Web.UI.Page:InternalProcessRequest ()
  in <0x000c2> System.Web.UI.Page:ProcessRequest =
(System.Web.HttpContext)
  in <0x002eb> ExecuteHandlerState:Execute ()
  in <0x00084> StateMachine:ExecuteState =
(System.Web.HttpApplication/IStateHandler,bool&)



  ------------ Connection String -----------------------
  the Connection String used to connect our database on windows 2000 is  =
Server=3Ddsl2;
  Database=3Dpubs;
  User ID=3Ddsl2\\administrator;
  Password=3D;
  Integrated Security=3DSSPI;

  here dsl2 is name of windows 2000 machine
   =20
  I hope this helps you to resolve your problem

  thanking you in advance=20

  Abdeali=20



   
------=_NextPart_000_009E_01C4B6A0.078F7040
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1476" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi Abdeali</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>That error is because mono cannot =
resolve the dsl2=20
hostname. you should either make that possible or just use the ip =
address of the=20
windows machine.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>matthijs</FONT></DIV>
<BLOCKQUOTE=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Da_nagarwala@rediffmail.com=20
  href=3D"mailto:a_nagarwala@rediffmail.com">Abdeali Nagarwala</A> =
</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dmono-list@lists.ximian.com=20
  =
href=3D"mailto:mono-list@lists.ximian.com">mono-list@lists.ximian.com</A>=
 </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, October 20, =
2004 12:08=20
  PM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> [Mono-list] Access MS =
Sql Server=20
  2000 from ASP.NET on Linux (Mono)</DIV>
  <DIV><BR></DIV>
  <P>Hello All,<BR>We are trying to connect our MS SQL Server 2000 =
database=20
  which is on Windows 2000 professional, through an ASP.NET application =
from=20
  Linux RedHat using Mono. <BR>we are getting fallowing error in the=20
  browser<BR><BR>Server error in '/' application<BR>Description: Error=20
  processing request.<BR><BR>Error Message: HTTP 500.<BR><BR>Stack=20
  Trace:<BR><BR>System.Net.Sockets.SocketException: No such host is =
known<BR>in=20
  &lt;0x000a0&gt; System.Net.Dns:GetHostByName (string)<BR>in =
&lt;0x00079&gt;=20
  System.Net.Dns:Resolve (string)<BR>in &lt;0x0015b&gt;=20
  Mono.Data.Tds.Protocol.TdsComm:.ctor=20
  (string,int,int,int,Mono.Data.Tds.Protocol.TdsVersion)<BR>in =
&lt;0x00132&gt;=20
  Mono.Data.Tds.Protocol.Tds:.ctor=20
  (string,int,int,int,Mono.Data.Tds.Protocol.TdsVersion)<BR>in =
&lt;0x0001d&gt;=20
  Mono.Data.Tds.Protocol.Tds70:.ctor (string,int,int,int)<BR>in =
&lt;0x00081&gt;=20
  (wrapper remoting-invoke-with-check) =
Mono.Data.Tds.Protocol.Tds70:.ctor=20
  (string,int,int,int)<BR>in &lt;0x000ba&gt;=20
  Mono.Data.Tds.Protocol.TdsConnectionPoolManager:CreateConnection=20
  (Mono.Data.Tds.Protocol.TdsConnectionInfo)<BR>in &lt;0x00032&gt;=20
  Mono.Data.Tds.Protocol.TdsConnectionPool:CreateConnection ()<BR>in=20
  &lt;0x00225&gt; Mono.Data.Tds.Protocol.TdsConnectionPool:GetConnection =

  ()<BR>in &lt;0x002cc&gt; System.Data.SqlClient.SqlConnection:Open =
()<BR>in=20
  &lt;0x0004f&gt; (wrapper remoting-invoke-with-check)=20
  System.Data.SqlClient.SqlConnection:Open ()<BR>in &lt;0x00051&gt;=20
  TestCSonLnx.WebForm1:Page_Load (object,System.EventArgs)<BR>in =
&lt;0x00069&gt;=20
  (wrapper delegate-invoke)=20
  System.MulticastDelegate:invoke_void_object_EventArgs=20
  (object,System.EventArgs)<BR>in &lt;0x00086&gt; =
System.Web.UI.Control:OnLoad=20
  (System.EventArgs)<BR>in &lt;0x00024&gt; =
System.Web.UI.Control:LoadRecursive=20
  ()<BR>in &lt;0x00198&gt; System.Web.UI.Page:InternalProcessRequest =
()<BR>in=20
  &lt;0x000c2&gt; System.Web.UI.Page:ProcessRequest=20
  (System.Web.HttpContext)<BR>in &lt;0x002eb&gt; =
ExecuteHandlerState:Execute=20
  ()<BR>in &lt;0x00084&gt; StateMachine:ExecuteState=20
  =
(System.Web.HttpApplication/IStateHandler,bool&amp;)<BR><BR><BR><BR>-----=
-------=20
  Connection String -----------------------<BR>the Connection String =
used to=20
  connect our database on windows 2000 is&nbsp;=20
  Server=3Ddsl2;<BR>Database=3Dpubs;<BR>User=20
  ID=3Ddsl2\\administrator;<BR>Password=3D;<BR>Integrated =
Security=3DSSPI;<BR><BR>here=20
  dsl2 is name of windows 2000 machine<BR>&nbsp; <BR>I hope this helps =
you to=20
  resolve your problem<BR><BR>thanking you in advance <BR><BR>Abdeali=20
  </P><BR><BR><A =
href=3D"http://clients.rediff.com/signature/track_sig.asp"=20
  target=3D_blank><IMG hspace=3D0=20
  =
src=3D"http://ads.rediff.com/RealMedia/ads/adstream_nx.cgi/www.rediffmail=
.com/inbox.htm@Bottom"=20
  border=3D0></A> </BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_009E_01C4B6A0.078F7040--