Results 1 to 5 of 5
  1. #1
    Join Date
    Nov 2003

    Unhappy Unanswered: asp, trusted authentication, sql server 2000


    i'm trying to write a database application using asp (not .net) and need to have it connect to SQL server 2000 using windows integrated security and trusted authentication. i have the following asp code:

    DIM dbConn
    set dbConn = Server.CreateObject("ADODB.Connection")
    DBconn.Open "Driver={SQL Server};Server=DBSERVER;Database=MyDatabase;Truste d_Connection=yes"

    i can access the page from the local webserver (http://localhost/sample.asp) but cannot access it from another machine. when i access it via another machine, it prompts for a un/pw but still says:

    "Login failed for user (null). Reason: Not associated with a trusted SQL server connection"

    please help...thanks

  2. #2
    Join Date
    May 2003

    Try setting up an ODBC connection ( make it use NT authentication ) on the web box to the SQL box and see if the problem goes away.

    That may help establish where the problem is. Also, do you have same version of MDAC on web server & SQL Server boxes?



  3. #3
    Join Date
    Nov 2003
    i do have an odbc connection to the sql database on the web box (which currently is an xp pro machine for testing purposes, once i finish it will be moved to a 2000 server box) do i get it to use that specific connection?

  4. #4
    Join Date
    Feb 2002
    Try the following connection string:

    Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=mydatabase;Data Source=dbserver

    Also, your iis configuration may not be correct.

  5. #5
    Join Date
    Nov 2003
    After a good deal of troubleshooting, I have reason to believe that my IIS server is at fault. I do not know how to configure it correctly to use integrated security. I thought I had it correct - I do not allow Anonymous access, and under Authenticated access I have:

    Digest authentication for Windows domain servers is checked (I've tried not using this, and recieved the same result)

    Basic authentication (password is sent in clear text) is NOT checked

    Integrated Windows authentication is checked.

    When logging onto the ASP page, it does prompt for a user name and password. Upon entering my AD logon/password (which does have permission on the database), it errors out, reporting Login failed for user (null). This error is the same as it appears in SQL server's logs.

    I can access it directly from the server without incident. Also, if i *do* allow anonymous access and use my credentials (as opposed to IUSER_blah), I can access it successfully. Otherwise, it reports the aforementioned error.

    It might be mentioned that the machine I've been using to try to access the page is on XYZ domain, as is the IIS server - however, the SQL server is in the ABC domain. Does this matter?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts