in

SharePoint Blogs

The Best Place for SharePoint-related Blogs

echef

From the cluttered (and clustered) brain of Josef Nielsen... A great place for Food, Friends, and... uh... SharePoint of course!

Excel Calculation Services (ECS) Invalid Handle error

Just had this happen to me while testing out a new IIS Build script...
 
When firing up the ECS on a new farm, if you get the following "Handle is Invalid" error:
 
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)
... and so on ...
 
You need to set permissions as follows:
 
"C:\Documents and Settings\All Users\Application Data\Microsoft\Crypto\RSA\MachineKeys"
 
Add Local Administrators - Full
Add NETWORK SERVICE - Read
 
Then try firing up ECS...

I got this error in the Event Log (Applicaiton) as an Office SharePoint Server error with EventID of 6482 (MOSS Shared Services).  Not sure if this is always this ID or not.  It is accompanied by a 7034 event (Topology) telling you to try it again (which obviously wouldn't work with the fix first).
 

Comments

 

Tom said:

Didn't work for me, though I had the same error.  Had an Event ID of 6482 and plenty of "System.Security.Cryptography.CryptographicException: The handle is invalid." kind of messages in the logs.  I would have thought your fix would've done it, but apparently there's a little bit more to my issues than yours.  Even an IISRESET after changing the ACL didn't work to let me start the service.

July 19, 2008 10:03 AM
 

Tom said:

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 "Change owner 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"

Click Apply, 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 19, 2008 10:23 AM

About josef.nielsen

I'm a long time computer nerd, living and loving technology wherever I can find it. I've recently shifted from a focus in MS SQL server, MSCS Clustering, and High Availability Engineering to focus on collaboration technologies, including SharePoint 2007. I recently moved from my long-time home in Seattle Washington to Salt Lake City.

Need SharePoint Training? Attend a SharePoint Bootcamp!

Posts (c) their respective authors. Everything else (c) 2007 SharePoint Experts