in trusted connection hw will we get the client windows user id.i am getting only server windows user id when i run the application in server.by when client run iam not getting client windows user id.

8 Years
Discussion Span
Last Post by jinus

give me some more info..
i dnt understand your case..!

In client system when I run the URL, I got this below error"Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'".

I used TrustConnection=yes in connection string.


In trusted connection. The below error Ocuur
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.

the Original Application is in my sys, when i run this ,its work fine.

when some one acces this application using my SystemIP the above error occurs.

Edited by sureshrajanmca: n/a


I write the Connectionstring and open the connection, when i run this application in client system the above error occurs.


again i'm not sure..
you need to provide access rights to database.

show me your connection string..

Edited by dnanetwork: n/a


Already gave access rights to database.

IN web.config

<add name="MyDbConn1" connectionString="Server=\mssql;Database=ss;Trusted_Connection=Yes;" />
Dim wic As WindowsImpersonationContext = Nothing
        wic = WindowsIdentity.Impersonate(IntPtr.Zero)
     Dim cnn As New SqlConnection(ConfigurationManager.ConnectionStrings("MyDbConn1").ToString())        

      cnn.Open()                             //in this line client system got error
        If cnn.State.ToString() = "Open" Then
        End If

Edited by Ezzaral: Added code tags. Please use them to format any code that you post.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.