Results 1 to 6 of 6
  1. #1
    Join Date
    Jun 2002
    Location
    Belgium
    Posts
    43

    Unhappy Unanswered: xx.ASP failed login, Microsoft OLE DB Provider for ODBC Drivers (0x80004005)

    Dear colleagues

    I wrote ASP routines to function on an IIS4 installed on a WIN2000 machine. These ASP routines worked perfectly well when connecting to an SQL7 db running on an NT4 server SP6.

    When i changed the connection string in the ASPs to refer to an SQL7 db running on an WIN2000 server
    (NEITHER SQL7 servr is physically running on the IIS4 servr, BOTH servrs are INSIDE the firewall protected area and on the SAME DOMAIN)

    I got the following error:

    Error Type:
    Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
    [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

    The original SQL7 srvr and the new sql7 srvr are configured in the same way using the same naming conventions etc.

    Can anyone give me a practical solution to this problem? THANKS!

    Vincent Seghers
    IT dept. City of Gent
    www.gent.be
    vincent.seghers@gent.be

  2. #2
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    Are you specifying a userid and password in your connection string. If not and are using a trusted connection, who is IIS running as?
    MCDBA

  3. #3
    Join Date
    Jun 2002
    Location
    Belgium
    Posts
    43

    xx.ASP login failure

    Hello colleague

    I'm using a connect object in my ASP which in turn uses a "standard" connection string as shown below. I cannot tell for sure at this moment but i think the IIS service runs as a system acount. I use the default SQL security mode which is UID + password (in the example the password is empty).

    conObj.Open "DATABASE=IntraDB;DSN=SQLINTRANET;UID=Project;Pass word="

    This connectionstring worked perfectly when the ASP "runned between" the IIS4/WIN2000 and SQL7/NT4 servers. The DSN i typed later in the connectionstring however is an SQL7/WIN2000 server and from then on i got the error message i mentionned in my first post.

    Thanks for your help!
    VincentJS

  4. #4
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    Two things I can think about to test.

    1) Make sure that the DSN - SQLINTRANET is defined correctly on the IIS server.

    2) Verify that you can connect to SQL with the UID of Project. Use the command-line utility isql to check.

    isql -S<new_server> -UProject -P
    MCDBA

  5. #5
    Join Date
    Jun 2002
    Location
    Belgium
    Posts
    43

    xx.ASP login failure (update)

    hello again !

    Well i checked with isql and it seems to function normally (isql -SSQLINTRANET -UProject -P -q"SELECT * FROM tblxxxxx"). isql returned the SELECT results in a normal fashion the output revealing the data i would expect.

    I checked how SQLINTRANET is declared in the Network Client utility and it seems to be ok.
    (Alias SQLINTRANET, Name SQLINTRA, Protocol TCP/IP, Port 1433, rpc out, rpc in)

    i checked the ASP routines by using the old DSN in my connection object and they work ok.

    I still cant tell whether IIS4 is running as system account under WIN2000. What i can tell is that i checked directory security of the ASP test directory in IIS manager. Anonymous login is set to true allowing IIS to check the password, as well as normal password/login check and Windows integrated security. Execute rights are given within the test directory by IIS.

    SQL User "Project" has Public/Data reader-writer/Projectsgroup rights within SQL on the table tblxxxxx.

    I haven't checked communications to and from the SQL server with SQL trace (profiler) yet (on my NT4/SQL7, profiler gave an error 1114 ! unable to load sqltrace.dll) - SQL Servicepack 4 installed.

    One last remark, the SQL Servicepack on the SQLINTRA is SP3.

    The situation remains the same. When i specify DSN SQLINTRANET in the connection string the error stays the same as in the first post.

    Any more suggestions would be welcome -)

    Thank you once again for your effort!
    VincentJS

  6. #6
    Join Date
    Dec 2001
    Location
    Toronto, Canada
    Posts
    335
    I have a little confusion here, I always believed that DSN was used with ODBC. To create a DSN you used the ODBC Administrator to setup your connection and then from ASP you specify the DSN name. The Client Utility is used by SQL Server programs, isql, Query Analyzer, Enterprize Manager, etc.

    Try removing the DSN and replacing it with the server name. Here is an example of what we use:

    objCN.Open "Driver={SQL Server};Server=" & DB_COUNTER_SRVR & ";Uid=" & DB_COUNTER_UID _
    & ";Pwd=" & DB_COUNTER_PWD & ";Database=" & DB_COUNTER_DB


    We have the passwords and userids setup as constants in an include file so when we move from Test to UAT to Production we only change the values in the include file and not the ASP pages.
    MCDBA

Posting Permissions

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