Actually I am complaining about very simple bit of code. It is so simple that even I could write it (or copy and paste it) a million times. All I want to do is to set a user’s Credentials into the Single SignOn database from a WebPart, but the frigging thing keeps failing.
string[] rgSetCredentialData = new string[2];
rgSetCredentialData[0] = "2ser";
rgSetCredentialData[1] = "rb26dett";
Credentials.SetCredentials(
1,
"TestSSOAPP",
rgSetCredentialData);
The error returned is SSO_E_CANARY_VALIDATION_FAILURE, O.K. now what the hell is a Canary? And what is it doing in SharePoint. Adding the current WebPart Page to the SSOCanaryChecker (the class name sounds like a name for veterinarians who deal with canary birds doesn’t it?) had no effect. Adding a FormDigest control to the WebPart had no effect.
But you know what, the above code snippet works like a charm in a Console App or a Windows Form, which leads me to believe this canary who ever it might be has something against the Web.
Fortunately I am not the only one facing this dilemma, there were 2 other similar postings on the newgroups (one from Geoff and another from Christopher), but in the usual SharePoint.PortalServer and SharePoint.PortalServer.Development fashion they were unanswered.
So my friends; Christopher and Geoff, my deepest sympathies to you.