Cannot generate SSPI context when connecting to SQL Server when a VPN is connected

We setup a VPN connection to another site, but then programs would not connect to SQL Server using Windows Authentication. We spent a fair bit of time trying to resolve this. Then found the solution, thanks to the following post:


http://www.sevenforums.com/network-sharing/59414-win7-vpn-sql-server-cannot-generate-sspi-context.html

After a lot of searching i found a good solution to the problem when using Windows login to a SQL server while on Win VPN giving the error: Cannot generate SSPI context.
Wanted to share it:

  1. Locate the .pbk file that contains the entry that you dial. Is either: C:\Users\<USERNAME>\AppData\Roaming\Microsoft\Network\Connections\Pbk or if connection is visible to all users: C:\ProgramData\Microsoft\Network\Connections\Pbk (hidden files may need to be disabled first through Organize -> Folder and search options)
  2. Open the file in Notepad using Open with…
  3. Locate the following entry: UseRasCredentials=1 Each VPN connection you have has a section marked with [<VPN connection name>]
  4. Modify the entry to the following: UseRasCredentials=0 Needs to be done for each VPN section for the connections having problems.
  5. On the File menu, click Save, and the click Exit.

Advertisements

VPN gets stuck on “Verifying username and password”

When attempting to connect the VPN gets stuck on “Verifying username and password” (hangs). After a while it then gets stuck on “Connecting to **.**.***.*** using *” and eventually returns a long message and may attempt to redial. The solution below is for messages containing text including GRE.

HYPOTHESES

  1. Also I was using both a laptop and PC with VPN switching to a couple of companies. It may fail on one machine if the other machine is already logged in.
  2. Possibly following a failed connection, I found that a VPN I have used a lot on Windows 7 had a blank User name: when this was normally filled in.

EXPERIMENT

  1. Hypothesis 1:- Reverse the first machine to log in. This time the other machine VPN started failing and in fact scenario 2, the User name became blank.

SOLVED
Create a new VPN which worked, then delete the old VPN

UNSOLVED
For error message 800 there are different problems. One of these is conflict between two computers. There may be a timeout on the server before another computer may connect, possible 30 minutes. Secondly may need to uncheck “Use default gateway on remote network”, this worked once, did not work several times.

ALSO
There are pages on web e.g. however first try above
http://www.sevenforums.com/network-sharing/90522-vpn-not-accepting-incoming-connections.html

How do I … join a network domain using windows

To login to a work network

  1. Start > Computer > Right-click > Properties
  2. Change Settings > First tab is Computer Name > Bottom button is Change >
  3. Member of – select toggle button on Domain > Enter Name of Domain > Need to login to that domain > may need to restart

Once you have joined the domain you can use explorer address bar to type \\ <domain name> \ shared directory path

To login back in to home

  1. Start > Computer > Right-click > Properties
  2. Change Settings > First tab is Computer Name > Bottom button is Change >
  3. Member of – select Workgroup > normal name is “WORKGROUP”