Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2011
    Posts
    13

    Unanswered: error: user not associated with a trusted SQL Server connection

    I'm trying to connect to a SQL Server database from a web app programmed in C#/ASP.NET. It's throwing an exception that says "Login failed for user 'CISUser'. The user is not associated with a trusted SQL Server connection."

    I've searched around for solutions to this problem and the only one I've come across is to change the authentication mode in the SQL Server Management Studio from "Windows Authentication" to "SQL Server and Windows Authentication". But on my machine, it's already set to "SQL Server and Windows Authentication". I've restarted the server and still I'm getting the same issue.

    What else could be causing this problem?

  2. #2
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    ....usb esp port is on the fritz...care to post your connection string?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  3. #3
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Is your SQL Server configured to accept SQL Authenticated connections?

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  4. #4
    Join Date
    Nov 2011
    Posts
    13
    Quote Originally Posted by Brett Kaiser View Post
    ....usb esp port is on the fritz...care to post your connection string?
    "user id=uuu;password=ppp;server=COREDATA23\\SQLEXPRESS; Trusted_Connection = no;Database=ContractorInvoiceSystem;connection timeout=30"

    Quote Originally Posted by Pat Phelan
    Is your SQL Server configured to accept SQL Authenticated connections?
    I think so. When I try to connect to the server, I'm able to select "SQL Server Authentication" and it gets me in.

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    I'd suggest using:

    "user id=uuu;password=ppp;server=COREDATA23\\SQLEXPRESS; Trusted_Connection = False;Database=ContractorInvoiceSystem;connection timeout=30"

    The "no" keyword used to sometimes work with VBA and very old versions of VB. I've never seen it work with ADO.NET.

    You are running your C# executable on the same machine running SQL Express, correct?

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  6. #6
    Join Date
    Nov 2011
    Posts
    13
    Thanks, but unfortunately that didn't solve the problem. Any other suggestions are always welcome.

Posting Permissions

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