Build SQL Connection string with integrated security for use over VPN?

后端 未结 1 734
北恋
北恋 2021-01-21 08:38

I have Winforms application that connects to a SQL database. We are changing the connection strings so that they will now use integrated security (Windows Authentication) instea

1条回答
  •  借酒劲吻你
    2021-01-21 09:26

    The VPN is a red herring. The issue is that the user is not logged in under the same domain as the SQL Server. The same issue would arise with any non-domain-joined PC, whether on a VPN or not.

    1. You could join the PC to the domain. This is the best solution.

    2. You could use the Legacy method - create matching usernames and passwords. However you then need to make sure they stay in sync.

    3. You could use the NET USE command or NetUseAdd API to log in to the domain after connecting to the VPN.

    See this question for more:

    • This is the best one for you to use: SQL Server Integrated Security

    • But see also this one: SQL Server Management Studio 2008 Runas user on different domain over VPN

    0 讨论(0)
提交回复
热议问题