Win7 VPN & SQL server: Cannot generate SSPI context

aas

New member
Local time
9:22 PM
Messages
1
After alot 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.
 

My Computer

OS
32bit enterprise
Great post! I was having this problem also, but the VPN seemed unrelated as I was not traversing the VPN to get to the SQL Servers.

As a "Oh hell! What could it hurt?" attempt I followed your suggestions and it worked!

Thanks for the tip,

-Jim
 

My Computer

OS
Windows 7
Spot on! Marvellous post :)

I could not connect to a local SQL server after connecting to another network via VPN. This resolved it.

Many thanks.

TEk
 

My Computer

OS
Windows 7 Professional
I am facing similar problem but the resolution specified doesn't seem to appropriate to my case,as we are using Juniper network connect VPN connection and it generates instant proxy service and when connected to SQL DB server it is throwing "SSPI context error"
 

My Computer

OS
windows 7 Enterprise edition 32 bit
OUTSTANDING POST!!!

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

C:\Windows\ServiceProfiles\LocalService\AppData\Roaming\Microsoft\Network\Connections\Pbk\_hiddenPbk.

Access to this folder is usually restricted, so as you drill into the folders Windows will (at some point) prompt to allow access.
 

My Computer

OS
Windows Server 2008 R2 Enterprise
Hey,
I applied this to a laptop running Windows 7 Enterprise 32 bit. We have a GPO in use, but I didn't see any reference to this area in the policy editor. When a new user logged in, the UseRasCredentials was set back to 1. I went in an manually edited the file back to 0. Next time the VPN software was activated, it reverted to 1 again. I'm going back through the GPO, but can't find any reference to RAS in any of the network sections.

We have smart card credentials that authenticate us to both the wired domain and then back in through the VPN concentrator. My biggest problem is trying to figure out why the file reverts back to '1' when starting the VPN (Windows VPN) connection again...

Any suggestions?

CT
 
Last edited:

My Computer

OS
Windows 7 Home Premium, 32 bit
Excelent

That was very helpful, thanks a lot!
 

My Computer

Computer type
PC/Desktop
OS
CORDOBA
Back
Top