Showing posts with label errorerror. Show all posts
Showing posts with label errorerror. Show all posts

Sunday, March 11, 2012

Errors in the encryption library Error

I'm getting the following error:

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

I've tried deleting the database and directory from the data directory. This doesn't fix it. I still get the same error. However if I change the name of the target and deploy the problem is resolved.

I'd like to retain the original name for the database if I can. Could somebody explain why it's got this problem with the original name and how I go about fixing it. Thanks.

Mark

Try backing up all rest of the databases on your server. Then stop the service and delete everything from the data directory.
You can see the location of your data directory in DataDir server property.

Start the service, restore rest of your databases and at this point you should be able to depoy your database under original name.

Edward.
--
This posting is provided "AS IS" with no warranties, and confers no rights.

Friday, February 24, 2012

Error: Unable to load one or more of the requested types.

When I'm trying to deploy a SQLCLR assembly , I get the following error:

Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

This is an error you get were you cannot get the assembly types during reflection.

I was able to deploy it previously, and I'm not aware of any change I made that could make it refer to a different external type.

It has a reference to another SQLCLR assembly that was successfully deployed. If I remove all the references in in the code to classes in that assembly, it works OK, so it looks that it cannot load this other assembly when trying to deploy the first one.

Is there any way to troubleshoot this? Getting that 'LoaderExceptions property' could be useful..

Any other hint?

Thanks

Are you using reflection against types that are in assemblies that are also registered in the database? or these are assemblies that are were not registered using CREATE ASSEMBLY? if it's the later, that's by design, you cannot load assemblies that were not registered with SQL Server.

Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.

|||Thanks Pablo.

I run into this issue again today, and it looks like a VS.NET thing.

I create two projects, one with an enumeration:

public enum MyEnum
{
MyValue,
MyValue2
}

and another project with a reference to the first one, that declares a variable of that enumeration type

MyEnum myEnum;

Then when I try to deploy the second project, I get

Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

But, I execute the CREATE ASSEMBLY commands, then it works OK. The weird thing is that in my real world case, I could deploy the assemblies without any problem and now I cannot.

So, it looks like a VS.NET issue. I'm not sure which is the right forum to post it ;)

|||Please make sure that the top level assembly was compiled against the version of the referenced assembly that is in the assembly.

- Balaji Rathakrishnan|||It looks that it was caused by a versioning issue. Even if I tried that before, it looks that setting a '1.0.0.0' version fixed the problem.

Thanks a lot.

Andres|||

Sir,

i am also facing the same problem.

first i refered the assembly from local. at that time it is working properly.

but now i moved assemblies to GAC ,now it shows the above mentioned error.

i seen the abve answers.

can u tell me how to run the CREATE ASSEMBLY commend.

thanks

Error: Unable to load one or more of the requested types.

When I'm trying to deploy a SQLCLR assembly , I get the following error:

Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

This is an error you get were you cannot get the assembly types during reflection.

I was able to deploy it previously, and I'm not aware of any change I made that could make it refer to a different external type.

It has a reference to another SQLCLR assembly that was successfully deployed. If I remove all the references in in the code to classes in that assembly, it works OK, so it looks that it cannot load this other assembly when trying to deploy the first one.

Is there any way to troubleshoot this? Getting that 'LoaderExceptions property' could be useful..

Any other hint?

Thanks

Are you using reflection against types that are in assemblies that are also registered in the database? or these are assemblies that are were not registered using CREATE ASSEMBLY? if it's the later, that's by design, you cannot load assemblies that were not registered with SQL Server.

Pablo Castro
Program Manager - ADO.NET Team
Microsoft Corp.

|||Thanks Pablo.

I run into this issue again today, and it looks like a VS.NET thing.

I create two projects, one with an enumeration:

public enum MyEnum
{
MyValue,
MyValue2
}

and another project with a reference to the first one, that declares a variable of that enumeration type

MyEnum myEnum;

Then when I try to deploy the second project, I get

Error: Unable to load one or more of the requested types. Retrieve the LoaderExceptions property for more information.

But, I execute the CREATE ASSEMBLY commands, then it works OK. The weird thing is that in my real world case, I could deploy the assemblies without any problem and now I cannot.

So, it looks like a VS.NET issue. I'm not sure which is the right forum to post it ;)

|||Please make sure that the top level assembly was compiled against the version of the referenced assembly that is in the assembly.

- Balaji Rathakrishnan|||It looks that it was caused by a versioning issue. Even if I tried that before, it looks that setting a '1.0.0.0' version fixed the problem.

Thanks a lot.

Andres|||

Sir,

i am also facing the same problem.

first i refered the assembly from local. at that time it is working properly.

but now i moved assemblies to GAC ,now it shows the above mentioned error.

i seen the abve answers.

can u tell me how to run the CREATE ASSEMBLY commend.

thanks