Re: SQL Server uses Windows authentication

From: Bob Barrows [MVP] (reb01501_at_NOyahoo.SPAMcom)
Date: 09/16/04


Date: Thu, 16 Sep 2004 09:14:19 -0400

The very first hit in a Google search (I just copied and pasted your error
message into the search field) revealed this:
http://support.microsoft.com/?id=811889

The second one was this:
http://support.microsoft.com/?id=814401

Here are the rest of the search results:
http://www.google.com/search?sourceid=navclient&ie=UTF-8&q=%22Cannot+generate+SSPI+context%22

Bob Barrows
Astra wrote:
> I have used the following DSN-less string as per recent advice:
>
> strDSN = "Provider=sqloledb; Data Source=" & strIP & "; Initial
> Catalog=" & strDB & "; Integrated Security=SSPI"
>
> strIP and strDB integrate into the string correctly, but I get the
> following error message:
>
> Microsoft OLE DB Provider for SQL Server error '80004005'
> Cannot generate SSPI context
>
> /stocklevels.asp, line 83
>
> What am I doing wrong?
>
> Rgds Robbie
>
>
> "Ken Schaefer" <kenREMOVE@THISadOpenStatic.com> wrote in message
> news:O2u4ZQ4mEHA.3428@TK2MSFTNGP11.phx.gbl...
> Are the machine in the same domain?
>
> With Windows Authentication you do not put any credentials in the
> connection string. The connection uses the credentials of whatever
> thread is opening the connection.
>
> Cheers
> Ken
>
> "Astra" <info@NoEmail.com> wrote in message
> news:%23HVZ5YzmEHA.2020@TK2MSFTNGP09.phx.gbl...
>> Hi All
>>
>> Could somebody post me the conn string I would use to enable my ASP
>> page on
>> 1 remote web server to connect to an SQL db on a completely different
>> remote
>> SQL server (windows 2000), which uses Windows authentication.
>>
>> SQL authentication I am fine with, but Windows authen confuses me as
>> to how
>> I put my login details through when the machines are remote.
>>
>> Thanks
>>
>> Robbie

-- 
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.


Relevant Pages

  • Re: perplexing SQL authentication from ASP.net issue
    ... the sql must be local or sql standard secuirty must be used. ... > directory security is set to Integrated Windows Authentication only. ... > I've tried a variety of connection strings. ... > connection string that VS.net uses. ...
    (microsoft.public.sqlserver.security)
  • Re: Login failed for user . The user is not associated with a trusted SQL Server connection.
    ... want to connect to an SQL 2005 server running on Windows 2003. ... If I use SQL authentication, ... windows authentication it gives the above error. ... server with that, it reports that the test connection is successful, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Performance reduction of SQL 2005 server when connected from Vista
    ... My problem is a strange and radiacal performance speed reduction of remote ... SQL 2005 server when connected from desktop. ... found no reduction in the speed of the SQL 2005 server remote connection. ...
    (microsoft.public.sqlserver.connect)
  • Re: ASP / SQLServer connection
    ... Your connection string uses SQL authentication but the error message looks ... Did you specify SQL ... authentication or Windows authentication in your ODBC setup? ...
    (microsoft.public.inetserver.asp.general)
  • Re: ASP / SQLServer connection
    ... Your connection string uses SQL authentication but the error message looks ... Did you specify SQL ... authentication or Windows authentication in your ODBC setup? ...
    (microsoft.public.sqlserver.programming)