Link to home
Start Free TrialLog in
Avatar of James St. John
James St. JohnFlag for United States of America

asked on

SQL Server connection problems with VPN

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
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of James St. John



The information contained in link to 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.