Re: Bizzare SQL Network Error



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

  • Re: VS2005: SQL Debugging "T-SQL execution ended without debugging. You may not have sufficient
    ... > account also must be a member of the sysadmin role in the target SQL ... and the Windows firewall is disabled on both client & server. ... to the remote SQL Server 2005. ... But I'm still getting the "T-SQL execution ended without debugging. ...
    (microsoft.public.vsnet.debugging)
  • Re: Utter madness!
    ... It is just Windows security stuff. ... You can get a trusted connection back to SQL server. ... ASP.NET account (either processModel or app pool identity depending on ...
    (microsoft.public.dotnet.framework.aspnet.security)
  • Re: Service Principal Name in Kerberos
    ... specific account with enabled 'Account is trusted for delegation', ... opens IE and accesses the Client App on IIS that then accesses the Server ... Windows Server 2003 or Windows Vista ... Microsoft Online Community Support ...
    (microsoft.public.platformsdk.security)
  • Re: Cannot generate SSPI context
    ... No, the app does not run, no matter the user account used. ... >Jasper Smith (SQL Server MVP) ... >resource tool; nor CliConfig.exe perhaps I do need to ...
    (microsoft.public.sqlserver.security)
  • Re: Passthrough authenication w/ SQL trusted connection
    ... separate connection will be used for each security context (each user ... account will have it's own pool). ... if you are using a Windows 2000 Domain, ... backend SQL Server. ...
    (microsoft.public.dotnet.framework.aspnet.security)