Handle is Invalid Error on Search Service
I keep getting a crypto error on the Shared Server Search, every 1 minute. I've stopped and recreated these to no help. In my mind it seems to be failing because it can't encrypt with a self signed cert? Any thoughts? Anyone seen this?Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchAdminSharedWebServiceInstance (33dacb47-30e5-41a8-8e9e-2c4a4941a895).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 randomKeyContainer) 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 System.Security.Cryptography.RSACryptoServiceProvider..ctor(CspParameters parameters) 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)For more information, see Help and Support Center at
June 19th, 2007 6:22pm

I get the same error when attempting to setup SharePoint 2007. It fails at the step psconfig -cmd services provision, under the function Microsoft.SharePoint.Utilities.CertificateManager.CreateSelfSignedSslCertificate.
Free Windows Admin Tool Kit Click here and download it now
June 21st, 2007 8:44pm

Hi, I had recently a similar problem related to IIS and asp.net. I cant remember the details, but the the solution was to give access to C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys Hope it helps Niels
June 26th, 2007 11:33am

This solved the problem that I was having. Thanks so much! you saved me some money and a phone call. Much appreciated. Strange, my account was in the local admins group that had full rights to this folder but once I added explicit permissions the problem went away and I was also able to start excel services. See you later annoying sharepoint is not complete message!
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2007 1:29am

PS, this needs to be created as a MS KB article ASAP.
June 29th, 2007 1:30am

I have the same problem trying to start the Excel Calculation Services. I added my account to the directory NTFS permissions but it was still not fixed... Any ideas?
Free Windows Admin Tool Kit Click here and download it now
July 12th, 2007 12:54am

I think I have a similar problem: Calling SPServiceInstance.Provision for instance Microsoft.Office.Excel.Server.ExcelServerSharedWebServiceInstance, service Microsoft.Office.Excel.Server.ExcelServerSharedWebService Task services has failed with an unknown exception Exception: System.Security.Cryptography.CryptographicException: The handle is invalid. I was going to try this as was suggested above: "give access to C:\Document and Settings\All Users\Application Data\..." but there is no Application Data folder. Am I missing something? Any other solutions??
August 31st, 2007 12:31am

I know that this is simple, but do you have your folders set to show all system and other folders? Not sure how this folder could not be there.
Free Windows Admin Tool Kit Click here and download it now
August 31st, 2007 2:18am

I missed seeing this in the Installation information before: "This means your administrator account should not be used as an application pool identity or to install a SharePoint Server 2007 server" So I reinstalled logged in as my SharePoint admin account and everything worked just fine.
August 31st, 2007 11:32pm

I was having the same problem,I had to give full access to the files inside C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys now its working fine.
Free Windows Admin Tool Kit Click here and download it now
April 9th, 2008 2:34am

Even after adding the Network Service, (Local) Administrators, and Everyone groups to the blasted folder at the "Full Control" level, and doing an IISRESET afterwards, it still would not work for me. I had to go Napoleon on it and apply that not just to the folder, but make all the contents inherit the bloody permissions. In the Security tab of the folder's Properties: Click Advanced Click the Owner tab Ensure the current owner says Administrators, if not, click it in the "Changeowner to" box Check the checkbox that says "Replace owner on subcontainers and objects" Hit Apply Click the Permissions tab Add the Everyone group (if you haven't already) by using the Add button, type Everyone, and click OK Highlight the Everyone group and click Edit Ensure "Allow" is checked for all the boxes and click OK Check the box that says "Replace permission entries on all child objects with entries shown here that apply to child objects" ClickApply, then Yes on the warning to continue Click OK Then click Apply & OK on the MachineKeys Properties window. This all did the trick for me. :-) -Tom
July 19th, 2008 6:21pm

This did it for me too :) thanks!
Free Windows Admin Tool Kit Click here and download it now
December 26th, 2009 3:11pm

This solution worked also for me! thx!
May 26th, 2011 5:16am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics