Re: Cannot Generate SSPI Context - help

From: Astra (info_at_NoEmail.com)
Date: 09/16/04

  • Next message: Astra: "Re: SQL Server uses Windows authentication"
    Date: Thu, 16 Sep 2004 09:29:45 +0100
    
    

    I have used the following DSN-less string:

    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

    "Manohar Kamath [MVP]" <mkamath@TAKETHISOUTkamath.com> wrote in message
    news:eZ7vP81mEHA.1800@TK2MSFTNGP15.phx.gbl...
    Almost correct...

    The IUSR_<> account on the machine, should have Windows authentication
    rights on the remote SQL server. That way, you do not include the userid and
    password in the connection string. When a connection is "trusted," it means
    the user who is requesting the connection is a user on the SQL server as
    well.

    -- 
    Manohar Kamath
    Editor, .netWire
    www.dotnetwire.com
    "Laphan" <news@DoNotEmailMe.co.uk> wrote in message
    news:uyxcVo0mEHA.392@tk2msftngp13.phx.gbl...
    > Dear Manohar
    >
    > Thanks for your reply.
    >
    > If I'm reading your email right, they do have Administrator set up as a
    > Windows authenticated user that connects to an SQL Server DB successfully.
    > I know this because they have a remote user that connects via a software
    > router to an ODBC connection on the SQL Server and this remote user uses
    > Administrator and the relevant password to get in.
    >
    > However when I tried to the Administrator and relevant password in my
    > connection string I received the exact same error message as below.
    >
    > How would one connect to a remote SQL Server using Windows authen?
    >
    > Rgds
    >
    > Robbie
    >
    >
    > Manohar Kamath [MVP] <mkamath@TAKETHISOUTkamath.com> wrote in message
    > news:OPlUqA0mEHA.3352@TK2MSFTNGP15.phx.gbl...
    > The user context (as in the NT name) of the connection should be
    registered
    > with the remote SQL server as a windows authentication user. Have you done
    > this?
    >
    > --
    > Manohar Kamath
    > Editor, .netWire
    > www.dotnetwire.com
    >
    >
    > "Astra" <info@NoEmail.com> wrote in message
    > news:e%23U5UHzmEHA.2708@TK2MSFTNGP10.phx.gbl...
    > > Hi Bob
    > >
    > > Thanks for coming back to me.  Now I get the following error:
    > >
    > > Microsoft OLE DB Provider for SQL Server error '80004005'
    > >
    > > Login failed for user 'rob'. Reason: Not associated with a trusted SQL
    > > Server connection.
    > >
    > > /stocklevels.asp, line 82
    > >
    > > Any ideas why?
    > >
    > > Rgds
    > >
    > > Robbie
    > >
    > >
    > >
    > > "Bob Barrows [MVP]" <reb01501@NOyahoo.SPAMcom> wrote in message
    > > news:uafTp1ymEHA.2908@TK2MSFTNGP12.phx.gbl...
    > > Astra wrote:
    > > > Hi All
    > > > strDSN = "Driver={SQL Server};Server=" & strIP & ";Address=" & strIP &
    > >
    > > Don't use ODBC! Use a SQLOLEDB connection string
    > > (www.able-consulting.com/ado_conn.htm). It may not solve this specific
    > > problem, but it will prevent others.
    > >
    > > > Microsoft OLE DB Provider for ODBC Drivers error '80004005'
    > > See this article:
    > > http://www.aspfaq.com/show.asp?id=2009
    > >
    > >
    > > 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: Astra: "Re: SQL Server uses Windows authentication"

    Relevant Pages

    • Re: Accessing an SQL Server database file
      ... Do you mind explaining to me how the connection string written their works? ... All systems have SQL Server Express and SQL Server 2005 installed. ... owningObject, SqlConnectionString connectionOptions, String newPassword, ...
      (microsoft.public.dotnet.languages.csharp)
    • RE: ASP.NET 2.0 deployment (w/ SQL Srvr 2005) error
      ... The connection string was ok. ... than the SQL Server Instance, ... owningObject, SqlConnectionString connectionOptions, String ...
      (microsoft.public.dotnet.languages.csharp)
    • Re: Custom membership provider problem
      ... SQL server 2005 does not install with the TCP/IP protocol turned on. ... >An error has occurred while establishing a connection to the server. ... 25 - Connection string is not valid) ... >Boolean& failoverDemandDone, String host, String failoverPartner, String ...
      (microsoft.public.dotnet.framework.aspnet)
    • RE: ASP .Net connection to Sql Server
      ... Using "dbmssocn" tells it to use the TCP/IP network driver, ... It is connecting via a connection string similiar to: ... > string to our production SQL server and everything runs fine. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Cannot Generate SSPI Context - help
      ... The IUSR_account on the machine, should have Windows authentication ... rights on the remote SQL server. ... When a connection is "trusted," it means ... > How would one connect to a remote SQL Server using Windows authen? ...
      (microsoft.public.inetserver.asp.db)