Windows > Software Development for Windows Client Forums > General Windows Development Issues > Connect SQL Server from WinForms - Windows Authentication Mode
Ask a questionAsk a question
 

QuestionConnect SQL Server from WinForms - Windows Authentication Mode

  • Friday, November 06, 2009 8:39 AMLubos Hladik Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    H i,

    is there a way how to connect to SQL Server from Windows Forms in C#, when Windows Authentication Mode is set in SQL Server and client (application) runs on a computer not in a domain ?

    Can I use some impersonation? I tried to use LogonUser() from advapi32.dll, but it doesn't work, when computer is not in a domain :(

    Thanks

All Replies

  • Friday, November 06, 2009 8:35 PMSheng Jiang 蒋晟MVPUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I suggest you visit the SQL Server Data Access forum on the technet forums web site,

    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful.
    Visual C++ MVP