SQL Server Error - The token supplied to the function is invalid
I am in the process of updating one of my ASP .NET applications from .NET 1.1 to 2.0. During my testing, I received an error "A connection was successfully established with the server, but then an error occurred during the pre-login handshake (provider: SSL Provider, error: 0- The token supplied to the function is invalid) (Microsoft SQL Server)" while attempting to connect to my local SQL Server (2000 to be exact)
Thank you Microsoft, as that error was about as non descript as the classic "Object reference not set to an instance of an object"
Anyway, the problem I had with the error was that I wasnt connecting via SSL.. its my localhost for crying out loud!
The solution to "my" problem wasnt anywhere out there on the Internet, which is why I am posting this blog. For some reason, my local account no longer had the access required to properly start the SQL Server 2000 service. To fix I had to:
- Go into services (right click "My Computer" and click manage, then click Services),
- Find the SQL Server Service (since its 2000, it was "MSSQLSERVER")
- Right click the service and click "Properties"
- Click the "Login" tab
- Under "Log On As", check "Local System Account"
- Restart the service (if its already running)
Oh yeah, if you are trying to use SSL for your SQL Server authentication, check out this link - http://support.microsoft.com/kb/276553/ I wasn't trying to do this.. but it looks like it would be useful if I was ;)

