Re: Bizzare SQL Network Error



I though that, but I'm not using Integrated Security, I'm implicitly passing
the sa username and password.

The bizzare thing is that, the same connection string, the same code to
connect to the database. In a windows APP it works fine, in a Web APP I get
the error that I posted earlier.

The SQL Database is not on the same machine as the applications. The SQL is
set to use Windows and SQL Authentication. The SQL Server does reside on a
Windows XP machine SP2 (no firewall, on domain).

Last resort I tried using ODBC configuring TCP/IP and Named Pipes, still
doesn't work. So I'm unsure if it's a .net issue or a connectivity issue.
The ODBC drivers work with testing the connection, but just not through
ado.net

This problem is a serious head scratcher!!!

"Robbe Morris [C# MVP]" wrote:

> Your ASP.NET request is not being run under the same windows
> account as your windows form app is. I suspect that you'll
> need to grant windows authentication to whatever windows
> account your ASP.NET requests are being run under. Hint,
> it isn't the account you are personally signed in as.
>
> On Windows 2003 Server, I believe the "Network Service"
> windows account is the default one. But, this can be altered.
>
> --
> Robbe Morris - 2004/2005 Microsoft MVP C#
>
> Earn money answering .NET Framework
> messageboard posts at EggHeadCafe.com.
> http://www.eggheadcafe.com/forums/merit.asp
>
>
>
> "Andy Furnival" <AndyFurnival@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:1EF7201A-01C0-43CC-AF47-F8165BBC56DC@xxxxxxxxxxxxxxxx
> >I am trying to connect to a default instance of SQL Server 2000 Enterprise
> >on
> > a remote network server using ADO.NET objects through ASP.NET Web
> > Application.
> >
> > The SQL SERVER is on a Windows XP machine (no firewall enabled) with
> > TCP/IP
> > and Named Pipes enabled
> >
> > For the test purposes, I created a new Web Form, created a new
> > SqlConnection
> > in the Server Explorer to the remote database. I test the connection is VS
> > IDE and everything is fine. I create a SqlDataAdapter on the web form,
> > generate a dataset, test the dataset and the results are valid. I bind the
> > SqlDataAdapter to a datagrid and run the webform. I now get the following
> > error.
> >
> > System.Data.SqlClient.SqlException: SQL Server does not exist or access
> > denied.
> > at System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
> > isInTransaction)
> > at
> > System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
> > options, Boolean& isInTransaction)
> > at System.Data.SqlClient.SqlConnection.Open()
> > at DBConnTest.WebForm1.Page_Load(Object sender, EventArgs e) in
> > c:\inetpub\wwwroot\dbconntest\webform1.aspx.cs:line 39
> >
> > Hmph! I take the same connection string from the web app, create a win
> > app.
> > Place a datagrid on the form, do the binding and load the app. Hey Presto!
> > it
> > works.
> >
> > I used TCPView (systeminternals.com) and I can see aspnet_wp trying to
> > create a connection, but its at though SQL Server is rejecting the
> > connection, although I see no failures in SQL Server.
> >
> > Any thoughts would be much appreciated.
> >
> > Andy
>
>
>
.



Relevant Pages

  • Getting to the bottom of MSDE network connection problems ...
    ... but other than that it is MSDE 2000 with sp3a already applied. ... I've finally figured out the connection problems associated with this, ... and it seems the problems are due to Windows XP and not MSDE. ... the enterprise/standard versions of SQL server won't install ...
    (microsoft.public.sqlserver.msde)
  • Re: Remote connection failed
    ... If you are going over a remote connection or are not logging ... into the domain where SQL Server is then no, Windows ... authentication won't work. ...
    (microsoft.public.sqlserver.connect)
  • Re: Problems Using Laptop As SQL Server - Log On Failed
    ... > connected to the network and no password for windows. ... > the name of the laptop as name of the SQL Server. ... > trusted SQL Server connection ... you have to change the authentication mode... ...
    (microsoft.public.sqlserver.msde)
  • Re: General Network Error
    ... connection, but you are not properly prepared to reopen a connection when ... retrieves data from a Sql Server 2000 instance, manipulates that data, ... The app works fine on the emulator during development. ... "General Network error. ...
    (microsoft.public.dotnet.framework.compactframework)
  • ADO.NET 2.0 & MSDE & Win98
    ... Framework 2.0 which must be deployed on Windows 98 platform. ... The MSDE will ... be installed on Win98 as the SQL Server to which the app will connect. ...
    (microsoft.public.dotnet.framework.adonet)