cannot generate SSPI context

Last Post 29 Jul 2010 03:52 AM by rm. 6 Replies.
AddThis - Bookmarking and Sharing Button Printer Friendly
  •  
  •  
  •  
  •  
  •  
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
paps
New Member
New Member

--
16 Jul 2010 06:20 AM
Can some one help me with this error.

On connecting from my VB.Net program I get this error mssg:
Microsoft.Net  Framework

Cannot generate SSPI context

The SQL DB is on the SERVER and the client machine that is running my program(VB.NET), when trying to connect to SQL throws the  above error.

If I re-boot the system it connects properly.

I tied all the stuff shown on the MS website but to na avail.

has any one run into his problem and have  they solved it?

Tnx
Paps

russellb
New Member
New Member

--
16 Jul 2010 10:06 AM
Are you using Windows Authentication to connect via the app?

Is the SPN registered on the SQL Server?
paps
New Member
New Member

--
19 Jul 2010 06:57 AM
HI,
I went through the KB and found this:
To use Kerberos authentication, you must make sure that all the following conditions are true:

* Both the server and the client computers must be members of the same Windows domain or members of trusted domains.
* The server's service prin***l name (SPN) must be registered in the Active Directory directory service.
* The instance of SQL Server 2005 must enable the TCP/IP protocol.
* The client must connect to the instance of SQL Server 2005 by using the TCP/IP protocol. For example, you can put the TCP/IP protocol at the top of the client's protocol order. Or you can add the prefix "tcp:" in the connection string to specify that the connection will use the TCP/IP protocol

I am still very new to SQL.
Could you please tell me how to check to see if the TCP/IP is enabled for SQL srever 2005?

How do I add the prefix to my connection string, my connection string is:
Public conn As New SqlConnection("Data Source=sqloledb;SERVER=lab1;Database=lcbDb;Trusted_Connection=YES;")

Would appreciate any help.
Tnx
Paps
gunneyk
New Member
New Member

--
19 Jul 2010 07:14 AM
You want to run the SQL Server Configuration Manager and look at the Network Configuration - Protocols on the server and on the client look at the SQL Native Client Configuration. You can find the congiguration tool under the SQL 2005 - COnfiguration Tools menu in the Windows Start Menu.
paps
New Member
New Member

--
23 Jul 2010 02:46 AM
Soory, I failed to mention that
the SQL SERVER on the SERVER is 2008 version.
gunneyk
New Member
New Member

--
23 Jul 2010 03:35 AM
Same thing just look in the menu choice for SQL 2008 - Configuration Tools.
rm
New Member
New Member

--
29 Jul 2010 03:52 AM
Did you follow this kb artivle http://support.microsoft.com/kb/811889?
You are not authorized to post a reply.

Acceptable Use Policy