.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Errors in the encryption library: Failed to encrypt sensitive data. Possibly the encryption key is i

Posted By:      Posted Date: May 22, 2011    Points: 0   Category :
Hi Experts,

While I was processing my CUBE, it prompts me this error:

Errors in the encryption library: Failed to encrypt sensitive data. Possibly the encryption key is inaccessible because of improper service account change.


it is deployed on SQL Server 2005 developer edition with SP2 which support Window Vista Ultimate.

Can anyone fix this?


View Complete Post

More Related Resource Links

Encrypt It: Keep Your Data Secure with the New Advanced Encryption Standard


The Advanced Encryption Standard (AES) is a National Institute of Standards and Technology specification for the encryption of electronic data. It is expected to become the accepted means of encrypting digital information, including financial, telecommunications, and government data. This article presents an overview of AES and explains the algorithms it uses. Included is a complete C# implementation and examples of encrypting .NET data. After reading this article you will be able to encrypt data using AES, test AES-based software, and use AES encryption in your systems.

James McCaffrey

MSDN Magazine November 2003

Trustworthy Code: Exchange Data More Securely with XML Signatures and Encryption


You can sign any kind of data using XML Signature, including part of an XML document, other XML documents, or other data of any format. However, in practice, XML signatures are most frequently used to sign other data represented in XML. In this article, the authors discuss the new standard and how you can benefit from it in your apps.

Mike Downen and Shawn Farkas

MSDN Magazine November 2004

List data validation failed error checking in dockument and uploading to library.

If I upload a document to the "vanilla" Document Library at the root site (I have not created sub sites yet, we are in the testing phase), the document does get uploaded but the following error appears: Error List data validation failed.   Troubleshoot issues with Microsoft SharePoint Foundation. Correlation ID: 0928c39a-f2d7-4ce6-8057-62cc01c6a951 Date and Time: 6/16/2010 5:27:58 PM Go back to site -------------------------------------------------------------------------- The doc has uploaded but is automatically checked out to me I am logged on as the ADMINISTRATOR Account Now if I try and discard the check out, it will fail as there is no original checked in version. If I try and click Check in, then the same error appears Help

How to add encryption key automatically in MS Enterprise Library

I'm a team member in developing an enterprise application that will be generating packages to submit to the enterprise contractors to install it at their PC. One of my tasks is to add encryption to the application's fields. this was accomplished by add encryption key to app.config file and the key was generated by MS Enterprise Library manager. In the above step I have to go to the manager application and create the key then copy it and paste it to the application config file. This is valid to be done in the current machine but once we created a setup project and generated a package and send it to the contractor, this step has to be done manually and at the contractor site. Is there a way to generate the key and add it to the application config file automatically on the application setup or at package generation? I hope that my case is clear and I need your help guys as I already tried to resolve this issue and the task due date is next week and I don't want to delay it. Thanks in advance for everyone who is going to help.

RSA Data encryption

I was trying to encrypt  my data using RSA, but I got an CryptographicException "Key not valid for use in specified state". I search around the web and found this: http://social.msdn.microsoft.com/forums/en-US/clr/thread/4e3ada0a-bcaf-4c67-bdef-a6b15f5bfdce/ which suggested that RSA can only encrypt 245 bytes or less of data Does anyone one if there is a way round this? thanks

PCI compliance - Transparent Data Encryption

I have been researching PCI compliance and SQL Server 2008.   I need to store credit card details in the database for a short period until the batch is closed.  One feature of SQL 2008 that keeps coming up over and over is Transparent Data Encryption.  One down side I see to Transparent Data Encryption is that we would need to bring in 3rd party software to manage the EKM and store the Asymmetric key(s).  I wanted to see what software people are using to manage their keys and get some general feedback on Transparent Data Encryption.  Thank you in advance for your time.   Cheers Ryan  

Encrypt in PHP, decrypt in ASP.NET - Encryption doesn't match


Hello all,

I have a problem decrypting a string in ASP.NET wich was encrypted at PHP. As a testcase, i tried to encrypt 'test' in ASP.NET and in PHP, using 3DES in cbc mode. But the encrypted values don't match :(. I want the values to match, so i know for sure i use the same encryption method. Please help me on this, I just don't understand how there are different values...

Here's the code i use in php: 

$cc = "test";

$key = pack("c*", 0x13, 0x56, 0x23, 0x15, 0x81, 0x28, 0x56, 0x51, 0x13, 0x56, 0x23, 0x15, 0x81, 0x28, 0x56, 0x52, 0x13, 0x56, 0x23, 0x15, 0x81, 0x28, 0x56, 0x51);
$iv = pack("c*", 0x42, 0x32, 0x84, 0x25, 0x79, 0x43, 0x11, 0x37);

      $block = mcrypt_get_block_size('tripledes', 'cbc');
      $len = strlen($cc);
      $padding = $block - ($len % $block);
      $cc .= str_repeat(chr($padding),$padding);

$cipher = mcrypt_module_open(MCRYPT_3DES,'','cbc','');
mcrypt_generic_init($cipher, $key, $iv);
$encrypted = mcrypt_generic($cipher,$cc);
echo base64_en

RSA Data encryption


I have an application the encrypt a username and password using RSA, and redirects to a second application on the same server. Does anyone know have to get the private key that was generate in the first application to the second application in order to decrypt it in the second application

a code snippet will be appreciated.  


Fips Compliance of Analysis Services and Encryption of Cube Data


We have SQL Server succesfully set up for FIPS Compliance, But require to setup the same Compliance for the Encryption of Data in Analysis services 2008 enterprise on the same Win 2008 server.

If we browse to the SAS Data Folder for our Project on the Fips Compliant  Instance We can view the Data Files and the Data is Visible in Plain Text. Depite the security setting being set to DataProtectMode 1 (Encryption).

So my Questions:

1. Is Analysis Services 2008 enterprise Fips Compliant ?

2. if it is How do we set it up

3. how do we prove to security Auditors that it is Set up and Working in Compliant Mode.

We have done Exaustive Searches of msdn Google blogs, sql-cat etc and found no relevent articles to Answer these specific Questions and are reluctant to Go to Chargeable support until we have exausted other available avenues.


 Colin Robinson


Data Encryption Questions




I have a webservice. I'd like to send some part of my data via the webservice encrypted. My questions are:

1) I have read this http://msdn.microsoft.com/en-us/library/as0w18af.aspx - Is there a way to encrypt data not to NetworkStream or FileStream but to a variabla which I could then send over the network as part of my data structure?

2) This encrepted data should be readable by more people. Is there an encription method which could be used with one central certificate to encrypt and decrypt the data? I mean if I install a certificate to my users that will used to encryption and decryption in my app. Is there a way to do this?

3) Most of the posts are before 2009 and it seems the most preferable encription method is the Rijndael algorithm. Now in 2010 is there a newer / better /more populare algorithm to use? Which algorithm do could you suggest me to search about?


I hope its clear what I looking for. :) Sorry if not!




Does .Net RSA Library support RSA Private Key Encryption using just D, modulus, and exponent?


I am creating a routine to replace old legacy code, that needs to encrypt a chunk of data with an old key. I only have D, the Modulus, and the Exponent. With the old code, I could encrypt using these, but the key sizes are now not flexible enough for the modern use of the code. Key sizes are large - 1024bits, 1152bits, up to 1536bits. (New large keys of course can be created and used via CRT, but I need to maintain support for the existing keys already in use.)

Does the MS .Net RSACryptographicProvider class allow any way of encrypting data with the private key, *without* needing the whole private key parts - ie. P,Q, Inverse Q, etc.. The encryption method is known as ME. Encryption using CRT method is quicker, but requires all parts of the private key to be known.

When I try to use the .Net class, it always responds with an "Only the public parts of the key are known. To encrypt, you require the private key part." error. I have provided the parts that are known - D, modulus, and exponent.


Incidentally, does the .Net class support an exponent of 03?


Code snippet:

using namespace System::Security::Cryptography;

                    CspParameters^ cspParams = gcnew CspParameters;

RSA Encryption - Encrypt with private key

Hey everyone, 

I am looking for a way to encrypt data with a private key, and have the public key decrypt it. I am aware this is generally NOT what you want from encryption, as it will be readable with by anyone with the public key, but that is exactly what I require. 

I require a string of data to be encrypted by the private key, so that only I can create the encrypted data, and have my application read it by the public key. The idea behind this is to create a license file for my application, encrypt the license details, and have the application read this data. This will prevent licenses being generated by anyone other than me, however will allow the application to read it by the public key. 

The idea of this is to control the encrypted data, and not care who can read it, only who can create it. 

Using the RSACryptoServiceProvider, I can create my public/private keys, I can encrypt the data with the private key, however when I go to decrypt with the public key, I get a "Key Not Found" exception. 

Signing with RSA is also not possible, as I need to compare encrypted data with plain text data, to ensure the license is valid, and signing only verifies the source, not what it contains

Data Encryption Between Two Sql Servers


Hi i need some help on this issue i am dealing with. I am trying to send and receive data between SQL server 2008 r2 installed on the server machine and another sql 2008 r2/other version installed on the client computer. What options do i have to have the data encrypted other than getting a SSL certificate from a trusted certificate authority. Please Let me know.


Entity Framework and SQLCE - Repeated Logging of data (quickly) causes failed to open errors

Hi all
I am using C# Visual Studio 2010 with EF 4.1. I am receiving some SCADA data that I would like to log to the database, all is well, until the data comes in quickly (not really that quickly)
I parse and massage the data, and then call a "logMessageToDB" function.
now if I call the function again before the last message has been logged, I get an error in my error handler
logging the message caused the following error -> The underlying provider failed on Open.
How can I log the data more quickly? why does it take so long to add a new record.
My function is below, please excuse the uglyness of it (I have just started with C#, there is a bit of a learning curve)

View State Encryption


Hi All,

Why is it that I see the same hash value generated when I use different algorithms for viewstate encryption. I have added below lines to the web.config file

<pages viewstateEncryptionMode="Always"

Data Truncation issue with Enterprise Library Logging WriteLog stored Proc


Hi ,

I'm using Enterprise Library Logging  feature for logging. The issue i am facing is when the Logging message is too large(more than 65534 chars) ,complete data  is not logged in the Formatted Mesage column which is  of data Type nText .

I am able insert complete data if i try inserting from Sql insert Query from sql management studio. Do i need to add any attributes to data base listener or do i need to change the sp.

 Is there any way to increase the WriteLog stored proc param size in EnterpriseLibrary.Logging config file ? . Please let me know.


Thanks In Advance.

data access library v4.1


Ive just started a project that will use the enterprise library 4.1 data access code blocks.  Its been years since ive used them, can anyone tell me what assemblies I need to reference in my project in order to use them ?  Ive referenced 


are there any others I need ?

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend