Re: Web Applicaiton using Trusted Connections to SQL on different machine?
From: Scott Townsend (scott-i_at_.-N0-SPAMplease.enm.com)
Date: 07/18/05
- Next message: MV: "Securing IIS6 checklist"
- Previous message: Dave T: "Not authorized to view page IIS5"
- In reply to: Bob Barrows [MVP]: "Re: Web Applicaiton using Trusted Connections to SQL on different machine?"
- Next in thread: Bob Barrows [MVP]: "Re: Web Applicaiton using Trusted Connections to SQL on different machine?"
- Reply: Bob Barrows [MVP]: "Re: Web Applicaiton using Trusted Connections to SQL on different machine?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Date: Mon, 18 Jul 2005 07:50:31 -0700
I've changed the Driver to Provider and set it to sqloledb. I get the Same
Errors. And yes, you are correct, it was on the Open, not the Execute.
Depending if I set the server to our backup Production SQL Server or the
Production SQL Server I get the following:
---backup Production SQL Server
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80040E4D)
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
---Production SQL Server
Error Type:
Microsoft OLE DB Provider for SQL Server (0x80004005)
Login failed for user '(null)'. Reason: Not associated with a trusted SQL
Server connection.
Then I do a "Response.Write Request.ServerVariables("logon_user")" I get the
proper Domain\UserID of who is logged into the Local Machine that I want
passed to the Webserver to Pass then to the SQL Server.
Thanks you,
Scott<-
"Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
news:ONzZn%23jhFHA.3568@TK2MSFTNGP10.phx.gbl...
> Scott Townsend wrote:
>> 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;"
>
> You should use the native OLE DB provider, not ODBC:
>
> enm.open "provider=sqloledb;Integrated Security=SSPI;" & _
> "Data Source=SERVER;Initial Catalog=Northwind"
>
>
>> Set rsUser = enm.Execute("SELECT * FROM customers")
>> Set enm = Nothing
>> I get the Error on the .Execute
>>
>
> On the Execute? If it was a problem with the connection itself, the Open
> statement would be throwing the error, not the Execute.
>
> What is the error?
>
> Bob Barrows
> --
> Microsoft MVP -- ASP/ASP.NET
> Please reply to the newsgroup. The email account listed in my From
> header is my spam trap, so I don't check it very often. You will get a
> quicker response by posting to the newsgroup.
>
>
- Next message: MV: "Securing IIS6 checklist"
- Previous message: Dave T: "Not authorized to view page IIS5"
- In reply to: Bob Barrows [MVP]: "Re: Web Applicaiton using Trusted Connections to SQL on different machine?"
- Next in thread: Bob Barrows [MVP]: "Re: Web Applicaiton using Trusted Connections to SQL on different machine?"
- Reply: Bob Barrows [MVP]: "Re: Web Applicaiton using Trusted Connections to SQL on different machine?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Relevant Pages
|