Tuesday, July 7, 2009
I installed 2003 server on my laptop and ran it using the Administrator account.
I opened old projects and attempted to update my dataset via the standard VS data set generator tool and got slapped with "Key not valid for use in specified state".

The problem?
I searched for some solutions with little luck. Eventually the problem appeared to be due to DPAPI.
What appears to have happened is that with the re-install the DPAPI information associated with my Data Connection was no longer valid.
The DataSet would open, verify the Data Connection used to create it and fail due to the DPAPI key being invalid.

The same thing can happen if you switch domain controllers or if you are assigned new Identities by your domain administrator.

The solution!
Delete the DefaultView.seView Data Connection with your Visual Studio ServerExplorer folder.
Close and re-open the DataSet. All good and working.

Visual Studio ServerExplorer folder Path:
C:\Documents and Settings\%username%\Application Data\Microsoft\VisualStudio\8.0\ServerExplorer

posted on Tuesday, July 7, 2009 3:18:10 PM (South Africa Standard Time, UTC+02:00)  #    Trackback
Related posts:
An unexptected error occured on send | SSL
HttpContext within a Business Layer
Regular Expression Syntax: Regex vs VS2005