I ran across an interesting problem today at a customer that I thought I’ll share with you. The background to the problem is that a SharePoint server 2007 farm needed to be moved to another AD (don’t ask why it was there in the first place…) and since we needed new service accounts the farm was taken down, servers where moved and then  the farm was installed again on the same servers. So far no problem at all and the installation ran successfully. But when I looked in the event viewer I saw that every minute on all servers in the farm I got the following Event ID 6482 every minute.

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (6b98c51f-116c-49f0-9aa6-4207555ed2f8).

Reason: The handle is invalid.

Techinal Support Details:

System.Security.Cryptography.CryptographicException: The handle is invalid.
at System.Security.Cryptography.Utils.CreateProvHandle(CspParameters parameters, Boolean
andomKeyContainer)
at System.Security.Cryptography.Utils.GetKeyPairHelper(CspAlgorithmType keyType, CspParameters parameters, Boolean randomKeyContainer, Int32 dwKeySize, SafeProvHandle& safeProvHandle, SafeKeyHandle& safeKeyHandle)
at System.Security.Cryptography.RSACryptoServiceProvider.GetKeyPair()
at System.Security.Cryptography.RSACryptoServiceProvider..ctor(Int32 dwKeySize, CspParameters parameters, Boolean useDefaultKeySize)
at Microsoft.SharePoint.Utilities.CertificateManager.CreateSelfSignedSslCertificate(CspParameters parameters, X500DistinguishedName name, DateTime expiresAfter)
at Microsoft.SharePoint.Administration.SPProvisioningAssistant.ProvisionIisWebSite(String serverComment, String[] serverBindings, String[] secureBindings, AuthenticationMethods authenticationMethods, String[] authenticationProviders, String path, AccessFlags accessFlags, String applicationName, String applicationPoolId, String[] scriptMaps, String sslCertificateSubjectName)
at Microsoft.SharePoint.Administration.SPMetabaseManager.ProvisionIisWebSite(String serverComment, String[] serverBindings, String[] secureBindings, Int32 authenticationMethods, String[] authenticationProviders, String path, Int32 accessFlags, String applicationName, String applicationPoolId, String[] scriptMaps, String sslCertificateSubjectName)
at Microsoft.Office.Server.Administration.SharedWebServiceInstance.Synchronize()
at Microsoft.Office.Server.Administration.ApplicationServerJob.ProvisionLocalSharedServiceInstances(Boolean isAdministrationServiceJob)
After some troubleshooting, googling and talking to the windows team I found that the folder:
C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys most likely had the wrong permissions. One of the files located in the folder didn’t seemed to like the move and when trying to look at the permissions I got this:

So, what I did was that I gave the ownership of this folder to the local administrators group which is done in the following way:

Click Ok on the warning that is shown above.

Click on Advanced and then on the Owner tab.

Select administrators, and click Ok until all windows are closed

Open up the security dialogue again and add the local administrators group and click ok. Note that if you have moved the server from one AD to another you will most likely see the old AD account in the security list which should be deleted.

You should add the local Administrator group to the MachineKeys folder above an make sure that it inherits the permissions.

This should solve the problem for you.

Today a new community site for us SharePoint folks are launched, and I have to say that I’m quite exited about it. First, because it will be a one-stop location for Microsoft SharePoint best practice information and educational materials for SharePoint administrators, developers and users. Secondly, I have been asked to be one of the moderators for the forum and an “Expert in Residence” for the Installation, Configuration and Administration section (http://www.idera.com/News/?NewsCategory=0&ID=256).

Now in the beginning there are a some prices that can be won if you just sign up. And why wouldn’t you, it’s free and you can win an iPad and other nice things!! If you have any questions on any of the topics, don’t hesitate to post them in the forum. The link to the site is www.secretsofsharepoint.com and to read the press release you can do that on Idera who is one of the main sponsors of the site. http://www.idera.com/News/?NewsCategory=0&ID=263

For all of you that follow my blog frequently, you are well aware of my projects together with my collegaue Niklas Goude who I’m currently writing the book PowerShell for Microsoft SharePoint 2010 Administratorswith. Niklas just got awarded the prestigious MVP award for his work in the PowerShell community and I just want to give [...]

It’s just announced that there will be a SharePoint conference in Singapore later this year. It will follow the same successful concept as the New Zealand and Australian SharePoint conferences held in beginning of June. It’s the crew at SPEvents that is running it and we can expect a well organized and interesting conference I’m sure!
Keep up [...]

The Australian SharePoint conference has just finished which concludes two great weeks with two great conferences (New Zealand last week)and I’m about to take the long trip back to Sweden. They guys and girls that have put together these conferences deserve all the cred they can get and of course a big thank you! It [...]

Last week the Swedish SharePoint user group had its third meeting in Gothenburg. The focus was this time on search were we first got a technical presentation and demo by Thomas Svensen from Microsoft about the capabilities of Fast for SharePoint. The second presentation was held by Henrik Strindberg from Findwise who talked about the [...]