Hi,
I have a Windows Application, a Novell Network and a SQL Server 2000 on an Active Directory controlled server. My AD account has access to teh database. I want to login to the database using an Active Directory account, trusted security....but I can't.
Sequence of Events:
1. Login to Network using Novell account.
2. Start Application and it displays login screen.
3. Enter AD account details and press OK
4. This verifies against Active Directory Account using the following code:
VB Code:
Public Function Login() As String ' now create the directory entry to establish connection Dim deDirEntry As New DirectoryEntry(Me.strDomain, Me.strUser, Me.strPass, Me.atAuthentType) Try ' if user is verified then it will welcome then Try Return deDirEntry.Username Catch exp As Exception Return "" End Try Finally 'deDirEntry.Dispose() End Try End Function 'Login
This all works fine and returns the username if the credentials match
5. Make database connection string (sUserName is the AD username):
6. I get the following error:VB Code:
Dim sConnstring As String = "User ID=" & sUserName & ";Initial Catalog=VendorSample;Data Source=MyServer...;Timeout=20;Trusted_Connection=True"
Login failed for user '(null)'. Reason: Not associated witha trusted SQl Server connection.
I'm not well up on how AD works etc. but does anybody have any idea how to get past this?




Reply With Quote