If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Microsoft SQL Server > error: user not associated with a trusted SQL Server connection

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-12-12, 15:48
gib65 gib65 is offline
Registered User
 
Join Date: Nov 2011
Posts: 9
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?
Reply With Quote
  #2 (permalink)  
Old 01-12-12, 15:53
Brett Kaiser Brett Kaiser is offline
Window Washer
 
Join Date: Nov 2002
Location: Jersey
Posts: 10,303
....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.
Reply With Quote
  #3 (permalink)  
Old 01-12-12, 17:24
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,609
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.
Reply With Quote
  #4 (permalink)  
Old 01-12-12, 19:08
gib65 gib65 is offline
Registered User
 
Join Date: Nov 2011
Posts: 9
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.
Reply With Quote
  #5 (permalink)  
Old 01-12-12, 23:09
Pat Phelan Pat Phelan is offline
Resident Curmudgeon
 
Join Date: Feb 2004
Location: In front of the computer
Posts: 12,609
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.
Reply With Quote
  #6 (permalink)  
Old 01-13-12, 12:51
gib65 gib65 is offline
Registered User
 
Join Date: Nov 2011
Posts: 9
Thanks, but unfortunately that didn't solve the problem. Any other suggestions are always welcome.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On