Re: Reason: Not associated with a trusted SQL Server connection.

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: John Beschler (JohnBeschler_at_discussions.microsoft.com)
Date: 01/15/05


Date: Sat, 15 Jan 2005 07:55:02 -0800

Aaron,

Yes, I've verified this both in Enterprise Manager and in the registry
directly.

This is really frustrating. UI work with ASP and SQL all day at work and do
not have these problems. And we run our SQL server in mixed mode as well,
although we do not allow anonymous connections and we are in an AD domain.

Another note: I wrote a simple VB program that uses the same connection
string and it works, and I can access the DB using George Polouse's Query
Tools for ADO v 4.0 using the exact same credentials I am trying to use in
the ASP page.

Thanks,

"Aaron [SQL Server MVP]" wrote:

> Are you sure SQL Server is set up to use both SQL Authentication and Windows
> authentication?
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "John Beschler" <JohnBeschler@discussions.microsoft.com> wrote in message
> news:6973277B-E076-4386-B87D-0CE51569CE0A@microsoft.com...
> > Bob,
> >
> > I don't think it's a problem with the IUSR account because ASP runs fine.
> > Unless you are telling me that the system tries to use the IUSR account
> when
> > accessing the DB. If that's the case, why? I am specifically telling the
> > OLEDB driver which user id and password to use to access the DB in the
> > connection string. If this is the case, can you tell me how to override
> this
> > behavior?
> >
> > The full error message is: Login failed for user 'wink'. Reason: Not
> > associated with a trusted SQL Server connection. (Sorry I did not post
> the
> > full error message to begin with) so that seems to indicate that it is
> > attempting to connect to the DB with the correct user id.
> >
> > I did read through the article you pointed me to, but cound not find
> > anything related to my specific issue.
> >
> > Thanks,
> > John
> >
> >
> >
> >
> >
> >
> > "Bob Barrows [MVP]" wrote:
> >
> > > John Beschler wrote:
> > > > I get the subject message when I try to Open the connectio the
> > > > database.
> > > >
> > > > Scenario:
> > > >
> > > > IIServer: Win XP
> > > > DB Server: Windows server 2003 running SQL Server 2000
> > > > Mixed mode is enabled on SQL.
> > > >
> > > > Machines are NOT in domain
> > > >
> > > > Connectio String = "Provider=SQLOLEDB;Data Source=192.168.0.4;User
> > > > ID=****;password=********;"
> > > >
> > > > Any IDeas?
> > > >
> > > > NOTE: Using a third party tool I am able to query the databse using
> > > > SQLOLEDB.1 driver
> > >
> > > In ASP, the IUSR account on your server is the user, not you. See the
> > > discussion of your error in this article (make sure you read the KB
> article
> > > it links to):
> > >
> > > http://www.aspfaq.com/show.asp?id=2009
> > >
> > > 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

  • Re: ASP form write to DB issue
    ... Do a response.write with the SQL and try running that using whatever tool ... that posts the input to a ASP page (the ASP page must establish a ... ' Creating Connection Object and opening the database ... Set con = CreateObject ...
    (microsoft.public.scripting.vbscript)
  • Connection Pooling in ASP
    ... When connections are pooled in ASP to an SQL backend, ... times for a scheduling program and compare that using a join to the already ...
    (microsoft.public.inetserver.asp.db)
  • Re: IIS State - help appreciated
    ... > previously web classes managed it all. ... ASP page, but writing code around it, is possibly giving problems. ... > correctly and performance wise SQL seems fine - it's certainly not working ... it will not release a connection soon as well:) ...
    (microsoft.public.inetserver.iis)
  • Re: SQL server connection in the sleeping mode
    ... We are using ASP.NET with ADO.NET to connect to SQL ... using connection pool, and in our test environment after while we run out of ... server to automatically drop sleeping connection after x amount of time ... Use this account to connect to SQL via ASP page. ...
    (microsoft.public.sqlserver.programming)
  • Re: ASPUpload Form and Files
    ... you may want to learn ASP and database management. ... I have defined a database via the database wizzard named fpdb/aspupload.mdb with the correct data fields. ... Is ODBC the correct connection method? ... There are SQL Statements to insert to the SQL = "INSERT INTO MYIMAGES what is MYIMAGES? ...
    (microsoft.public.frontpage.programming)