ASP connect failure: not a trusted connection

  • I am trying to code an ASP page that calls SQL Server. Like so many others have reported, I receive the message "Login failed for user 'sa'. Reason: Not associated with a trusted SQL Server connection."

    One of the two pages I coded ran on my previous system, which was Win2K Advanced Server, with the MSDE SQL Server 2000 installed. I had no problems with that configuration. The ASP page ran.

    Then I tore that installation down, and installed Small Business Server 2000, which includes SQL Server 2000. I have SQL Server set to both Windows NT and SQL Server authentication.

    I cannot setup an ODBC connection from a client workstation in another domain (I get the same "trusted connection" message), however I can do so from the Win2K Small Business Server itself. (There are no client workstations in that domain yet.)

    My connect string is "Provider=SQLOLEDB;Data Source=(local);Database=SomeDB;UID=sa;PWD=;"

    I have added specific userids and passwords, to see if that would help. It hasn't.

    This may be a clue: while the original ASP page I coded results in the "trusted connection" error when run on the Small Business Server or on the client workstation, a new ASP page I coded has different errors. When run on the server, it returns a page that contains nothing but "Error: Access is Denied." When run on a client, it returns the same "trusted connection" error. (By "run" I mean where I am sitting, and bringing up Internet Explorer to get to the page.)

    I have read about 200 postings on this subject on various newsgroups, and I think I have tried just about everything at this point. Most of the postings suggest that NT & SQL Server authentication be selected, which I've done.

    I can't believe that something that looks so simple has now consumed hours and hours of my time, and I still can't connect!

    Note that I am not an experienced ASP programmer - this is the first time I've tried it - and my SQL Server experience is limited.

    Suggestion are welcome...

  • Check your authentication methods. Open up Enterprise Manager, expand your SQL Server group, and Right-Click on the server. Select Properties from the drop-down menu, and select the Security tag.

    Now, since it appears that you are using name/password security, make sure that you are using both SQL Server and Windows authentication. If you are not (you're only using windows authentication), then select the mixed-mode auth option, and click OK.

    Try it again.

  • Try this conn. string

    "Provider=sqloledb;Data Source=Srvr;Initial Catalog=DB;User Id=Usr;Password=PWD"

    MW


    MW

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply