Re: Web Applicaiton using Trusted Connections to SQL on different machine?

From: Scott Townsend (scott-i_at_.-N0-SPAMplease.enm.com)
Date: 07/11/05


Date: Mon, 11 Jul 2005 10:16:36 -0700

Thank you for your reply.

I'm not sure if this is really .Net Related though. I get the Error if I
use ASP.NET code to make the connection, or if i just use ASP code to make
the connection.

My ASP code looks like this:

     Set enm = Server.CreateObject("adodb.connection")
     enm.Open "Driver={SQL
Server};Server=SERVER;Trusted_Connection=yes;Database=Northwind;"
     Set rsUser = enm.Execute("SELECT * FROM customers")
     Set enm = Nothing
I get the Error on the .Execute

Thanks,

"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:e2EDQO7gFHA.3656@TK2MSFTNGP09.phx.gbl...
> Scott Townsend wrote:
>> I'm trying to get my Webserver to talk to my SQL Server and allow
>> Trusted Connections.
>>
>> If my SQL server and Web Server are on the same box I can get it to
>> work. There needs to be a User on the SQL Server that in running the
>> Web Application (in my case the ASPNET or Network Services account).
>>
>> So on the SQL and Web on the same box I can do this as the ASPNET or
>> Network Services Accounts are local the Server and can be added to
>> the SQL Server's Logins. Though the local Server accounts cannot be
>> added to a remote SQL Server machine. I need to have a Domain
>> Account to do this.
>>
>> I've Setup a separate Application Pool with a an Identity of a Domain
>> User. Given the Domain User Local Admin Perms on the Web Server and
>> Access to the SQL Server Databases that it needs.
>>
>> Though when I go to run the Application I do not see the Identity of
>> the new Domain user in the list of Tasks for the w3wp.exe. I still
>> see the local IWAM account.
>>
>> What am I doing Wrong?
>>
> Well, your latest mistake <grin> is posting to a classic ASP group (I'm
> reading this in .inetserver.asp.db) when you should be posting to a dotnet
> group such as microsoft.public.dotnet.framework.aspnet.
>
> As for what you are doing wrong in your .Net app, I really can't say for
> sure. Here are some KB articles that may help:
> http://www.google.com/search?sourceid=navclient&ie=UTF-8&rls=GGLC,GGLC:1969-53,GGLC:en&q=site:support%2Emicrosoft%2Ecom+%22SQL+Server%22+trusted+connection+ASP%2ENet
>
> If you don't find your answer there, post more information to the dotnet
> newsgroup where you are more likely to find someone who can help (I'm just
> beginning with .Net myself, so my ability to help is limited)
>
> Bob Barrows
>
> --
> Microsoft MVP - ASP/ASP.NET
> Please reply to the newsgroup. This email account is my spam trap so I
> don't check it very often. If you must reply off-line, then remove the
> "NO SPAM"
>



Relevant Pages

  • Security context issue (weird behavior)
    ... The SQL Server is setup to use mix mode authentication. ... The users have a domain account. ... To log in to the SQL server I use an ADO connection. ... I tried to view the pages from another machine with the anonymous access ...
    (microsoft.public.data.ado)
  • Re: SQL Connection String using Domain Account
    ... Web.Config but now have the problem that the web site will not run under ... you can have a username/password set up in sql server - but this would ... The DBA has given me a Domain user account with rights to ... I am unable to get a connection to the database. ...
    (microsoft.public.dotnet.languages.csharp)
  • 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)
  • Re: MSSQL HEllo bug
    ... Microsoft claims that the default for SQL Server 2000 is a domain user NOT ... domain account as the service account during the installation phase. ... exists OR simply click the LocalSystem radio button to save themselves the ...
    (NT-Bugtraq)
  • Re: SQL Server on XP Home Network
    ... There is an "sa" account under the Security>Logins area. ... Does that coorelate to a SQL Server login? ... I tried setting up the connection to use that SQL Server ...
    (microsoft.public.sqlserver.setup)