locked
SQL Server DB connection failed with Windows authentication (Client-Server). RRS feed

  • Question

  • Hi All,

    We have a software product based on the Client-Server architecture (Client application is developed with C++ and Server application is developed with C#). On the Server side, we have the SQL Database and the Client application would be accessing the SQL DB for retrieving the Server settings and policies (using procedure call). 

    We have set all the client and server systems on a domain and connected the SQL DB with Windows Authentication. In this scenario when the Client application tries to access the SQL DB, it fails and the application is crashing (Open DB fails).  Our Client application is a Windows Service and running on the System account. And the Client computer is logged in with the domain user. 

    When we configure SQL DB with SQL Authentication, everything works fine. 

    Kindly help us to solve this issue.

    Thanks,

    R-VR

    • Moved by Baron Bi Tuesday, July 3, 2018 7:42 AM More related to database
    Friday, June 15, 2018 10:22 AM

All replies

  • Hi,

    thanks for posting here.

    >>SQL Server DB connection failed with Windows authentication (Client-Server).

    Please provide more information about how do you access the SQL DB with your c++ code. Have you got any error information or exception code?

    You could use Windbg to debug your application to find the root cause of the crash.

    https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/getting-started-with-windbg

    If your case is more related to with SQL data access, you could post on this forum below.

    https://social.msdn.microsoft.com/Forums/windows/en-US/home?forum=sqldataaccess

    Your understanding and cooperation will be grateful.

    Best Regards,

    Baron Bi


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 19, 2018 1:49 AM
  • Thanks, Baron Bi for the response.

    Here is the code snippet which makes the application crash:

    CDatabase dbServer;
    CString strConString = GetServerDBConnectionString(); //retrievs the SQL server DB connection string
    if(dbServer.OpenEx(sConString,CDatabase::noOdbcDialog)) // this line of code makes the application crash (Client side)
    {
    //success
    }

    Created the ticket in mentioned forums.

    Thanks,

    R-VR

    Wednesday, June 20, 2018 12:32 PM