Microsoft Knowledge Base Email Alertz

Error message when you try to use the SharePoint Products and Technologies Wizard: Exception: System.ArgumentException: Error during encryption or decryption

Search KbAlertz

Advanced Search

Receive Microsoft Knowledge Base articles by E-Mail?

Every night we scan the Microsoft Knowledge Base. If technologies you're interested in are updated, we'll send you an e-mail. You only get one e-mail a day, and only when new articles are added.

Click here to create a
FREE account
Already have an account?
[Click here to Login]











Microsoft Knowledge Base Article

This article contents is Microsoft Copyrighted material.
©2005-©2007 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks

Article ID: 927156 - Last Review: September 22, 2011 - Revision: 5.0

Error message when you try to use the SharePoint Products and Technologies Wizard: "Exception: System.ArgumentException: Error during encryption or decryption"

SYMPTOMS

Consider the following scenarios:
  • Scenario 1
    You install Microsoft Windows SharePoint Services 3.0, and then you install Microsoft Office SharePoint Server 2007. Then, you remove SharePoint Server 2007.
  • Scenario 2
    You install Windows SharePoint Services 3.0, and then you use Add or Remove Programs to remove Windows SharePoint Services 3.0. Then, you reinstall Windows SharePoint Services 3.0.
  • Scenario 3
    You install Windows SharePoint Services 3.0 in a stand-alone farm environment. You use the SharePoint Products and Technologies Wizard (PsconfigUI.exe) or Psconfig.exe from the command line to leave the stand-alone farm. Then, you use SharePoint Products and Technologies Wizard or Psconfig.exe from the command line to rejoin the farm.
In these scenarios, the next time that you try to run the SharePoint Products and Technologies Wizard, you receive an error message that resembles the following:
10/09/2006 14:08:26 8 ERR Task configdb has failed with an unknown exception 10/09/2006 14:08:26 8 ERR Exception: System.ArgumentException: Error during encryption or decryption. System error code 997. at Microsoft.SharePoint.Administration.SPCredentialManager.DecryptWithMasterKey(Byte[] rgbEncryptedPassphrase) at Microsoft.SharePoint.Administration.SPEncryptedString.GetSecureStringValue() at Microsoft.SharePoint.Administration.SPEncryptedString.get_SecureStringValue() at Microsoft.SharePoint.Administration.SPProcessIdentity.get_SecurePassword() at Microsoft.SharePoint.Administration.SPApplicationPool.Provision() at Microsoft.SharePoint.Administration.SPWebServiceInstance.Provision() at Microsoft.SharePoint.Administration.SPFarm.Join() at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.CreateOrConnectConfigDb() at Microsoft.SharePoint.PostSetupConfiguration.ConfigurationDatabaseTask.Run() at Microsoft.SharePoint.PostSetupConfiguration.TaskThread.ExecuteTask()

CAUSE

This issue occurs if the Network Service account is used as the farm account. In this situation, when you remove Windows SharePoint Services 3.0 from a stand-alone farm, or when you remove SharePoint Server 2007 from a Windows SharePoint Services 3.0 farm environment, the following registry subkey that is used to encrypt passwords that are contained in the Windows SharePoint Services 3.0 configuration database (configdb) is deleted:
HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\ FarmAdmin\
Therefore, when you try to join a Web application that exists in the configuration database that does not use the Network Service account, the Web application account credentials cannot be decrypted. This occurs because the required registry subkey is deleted.

WORKAROUND

Important This section, method, or task contains steps that tell you how to create a new SharePoint Configuration database. Before performing this action save any SharePoint settings that will be needed to recreate the SharePoint farm if it is still accessible. These include, but are not limited to farm wide settings in Central Administration, web application settings and site customizations. It may not be possible to join a SharePoint server back to the original Configuration database when experiencing the above error.

To work around this issue, run Psconfig.exe at the command line to create a new Windows SharePoint Services 3.0 configuration database. To do this, follow these steps:
  1. Click Start, click Run, type cmd in the Open box, and then click OK.
  2. At the command line, change to the following directory:
    \Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN
  3. At the command prompt, type the following command to create a new configuration database:
    psconfig -cmd configdb -create -server ServerName -database ConfigDBName -user Domain\User -password Password
  4. Rerun the SharePoint Products and Technologies Wizard.

APPLIES TO
  • Microsoft Windows SharePoint Services 3.0
Keywords: 
kbtshoot kbexpertiseinter kbprb KB927156
       

Community Feedback System

Very often, it takes hours to solve a problem. Very often, you've looked high and low, and have tried a lot of solutions. When you finally found it, chances are, it was because someone else helped you. Here's your chance to give back. Use our community feedback tool to let others know what worked for you and what didn't.

Please also understand that the community feedback system is not warranted to be correct, it's simply a system that we've built to let people try and help each other. If something in a feedback response doesn't make sense to you, or you're not comfortable making changes that the feedback talks about (like registry edits), please consult a professional.

Thank you for using kbAlertz.com Feedback System.

-- Scott Cate

Jeremy - jb NOSPAM-AT-NOSPAM dontpanic.biz Report As Irrelevant  
Written: 1/25/2007 9:11 PM
I get an error when doing I do this that says in a stand alone install you can not use -user and -password I checked my syntex and it matchs and is right. The command works just not for my stand alone problem. Any ideas. I have a standalone new server trying to install wss 3, had 2.o and tried an upgrade which failed so now I have this error.

skiff Report As Irrelevant  
Written: 1/27/2007 10:19 PM
Just wanted to let you know i had this same issue and was able to fix it by deleting the C:\Program Files\Microsoft SQL Server\sharepoint folder.

kubbiac - kubbiac NOSPAM-AT-NOSPAM yahoo.Fr Report As Irrelevant  
Written: 2/22/2008 2:24 AM
Hello, i m as jeremy in a stand alone configuration , don't found the sharepoint folder and the command line described doesn't work at all :'( somoene have an idea?

cathal Report As Irrelevant  
Written: 8/2/2008 7:18 AM
• if anyone could help I would be really grateful. here my story! apologies if Im going over old stuff here, Im new to all this. Server - Windows 2003 Standard .net framework 3.0 and 2.0 I'm Installing Ms Sharepoint Server 2007 - When I try to start Sharepoint 3 central administration, it prompts me for a username and password (not entirely sure which one its refering?) when I put in the admin username\password I get Server Application Unavailable The web application you are attempting to access on this web server is currently unavailable. Please hit the "Refresh" button in your web browser to retry your request. Administrator Note: An error message detailing the cause of this specific request failure can be found in the application event log of the web server. Please review this log entry to discover what caused this error to occur. In the application event log I get aspnet_wp.exe could not be started. The error code for the failure is 80004005. This error can be caused when the worker process account has insufficient rights to read the .NET Framework files. Please ensure that the .NET Framework is correctly installed and that the ACLs on the installation directory allow access to the configured account. and aspnet_wp.exe could not be launched because the username and/or password supplied in the processModel section of the config file are invalid. I can only find a machine.config but it seems to only belong to version 2 - located in C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\CONFIG I really dont know enough about all this and am reading as mucha s I can but getting nowwhere, anybody got any ideas?. Thanks in advance for any help.

Anonymous User Report As Irrelevant  
Written: 4/3/2009 8:33 AM
The command does not work for me since I have a stand alone install. It doesnt even allow to you provide a username/password when creating/connecting/disconnecting configdb. I am not sure what account it uses in case of Standalone install. Can someone pls help me out? since this is getting quite frustrating.

Aviw - gosha84@mail.ru Report As Irrelevant  
Written: 3/25/2010 6:03 AM
I found a solution for standalone farms: you should remove registry key: "HKLM\SOFTWARE\Microsoft\Shared Tools\Web Server Extensions\12.0\Secure\FarmAdmin\CredentialKey" and rerun configuration wizard.

Gary Enticott Report As Irrelevant  
Written: 4/7/2010 7:33 AM
Fantastic Fix !!!! :)

Anonymous User Report As Irrelevant  
Written: 4/7/2010 12:48 PM
That works great, thanks!