SQL Server connection problems with VPN

James St. John
James St. John used Ask the Experts™
We have a C# .NET application written against FW 3.5 that connects to a SQL server using Windows authentication on our local network.  The systems running the app are using Windows 7 SP1 or Server 2008 R2 SP1.

To provide support to some of our clients, we sometimes have to VPN (PPTP) into THEIR network - separate DNS servers, different domain name, IP subnet completely different from ours.

Whenever we're connected to a client's VPN, we get the following exception when we launch our application: System.Data.SqlClient.SqlException: Login failed for user ''. The user is not associated with a trusted SQL Server connection.

We don't understand this.  We're attempting to connect using credentials from the local domain to a SQL server on the local subnet.  Why are we getting this error?  What can we do to eliminate the problem?

We did some additional testing.
- Windows XP: problem does NOT occur.
- Windows Server 2003: problem does NOT occur.
- Windows Vista: problem does occur.
- Windows Server 2008: problem does occur.
- Windows 7: problem does occur.
- Windows Server 2008 R2: problem does occur.

-- Jim
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2013
Awarded 2012



The information contained in link to sevenforums.com worked perfectly for me.

Why Microsoft didn't make the setting on option on the VPN adapter settings dialog is anyone's guess.  

Also - if anyone turns on the "Allow other people to use this connection" option when setting up the VPN connection (I DON'T), I believe location of "common" rasphone.pbk is
Access to this folder is usually restricted, so as you drill into the folders Windows will (at some point) prompt to allow access.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial