Add Symmetric Algorithm Provider Error

Topics: Security Application Block
Sep 11, 2013 at 2:30 PM
Server Info
Windows Server 2008 R2 Standard
64-bit OS
Intel Xeon CPU
E5620 @ 2.4GHz
Memory 12GB

I'm working with a vendor to set up their application and during this process, the error below is received.

Steps Taken
  1. Open EntLib Config .NET 3.5 (x86)
  2. Choose Blocks
  3. Add Security Settings
  4. Choose "Security Caches" > "Add Security Caches" > "Add Security Cache"
  5. From "Caching Settings", choose "Encryption Providers" > "Add Encryption Providers" > "Add Symmetric Crypto Provider"
  6. From "Cryptography Settings" choose "Symmetric Cryptography Providers" > "Add Symmetric Cryptography Providers" > "Add Symmetric Algorithm Providers"
  7. From the "Browsing for types that derive from SymmetricAlgorithm" dialog box, expand "mscorlib", expand "System.Security.Cryptography", choose "RijndelManaged" and click OK.
The following error is received:
An error occurred executing the command Add Symmetric Algorithm Provider.
Message: Exception has been thrown by the target of an invocation.
Error Message: Exception has been thrown by the target of an invocation.
Editor
Sep 12, 2013 at 6:00 AM
It's hard to tell based on the generic message but I think the error might be occurring trying to create the RijndelManaged type.

I'm curious if you see the same behavior when running the 64 bit version of the configuration tool? Do you see the same error on all servers or just this server?

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Sep 16, 2013 at 2:38 PM
Hello Randy,

Thank you for the quick response. The download was completed from this link which states it supports both 32 and 64 bit architectures:
http://www.microsoft.com/en-us/download/details.aspx?id=15104

Supported Operating System
Windows 7, Windows Server 2003 R2 (32-Bit x86), Windows Server 2003 R2 x64 editions, Windows Server 2008, Windows Server 2008 R2, Windows Vista Service Pack 2

Supported architectures: x86 and x64.

Operating system: •Microsoft Windows® 7 Professional, Enterprise or Ultimate
•Windows Vista with Service Pack 2
•Windows Server 2008 R2
•Windows Server 2008 with Service Pack 2


Is there a link for a 64bit only download?
Editor
Sep 17, 2013 at 3:40 AM
Enterprise Library is compiled with AnyCpu (ProcessorArchitecture=MSIL) so it should run in native 32 and 64 bit environments.

For the configuration tool there are 4 versions provided (32 and 64 bit for .NET 3.5 and .NET 4):

EntLibConfig-32.exe
EntLibConfig.exe
EntLibConfig.NET4-32.exe
EntLibConfig.NET4.exe

You are running EntLibConfig-32.exe. The 64 bit version is EntLibConfig.exe ("EntLib Config .NET 3.5" in the menu).

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Oct 9, 2013 at 7:48 PM
Randy,

I tried running the 64 bit version but receive the same error. Any other suggestions?

Thanks,
Eric Masone
Editor
Oct 16, 2013 at 11:28 AM
Edited Oct 16, 2013 at 11:28 AM
emasone wrote:
I tried running the 64 bit version but receive the same error. Any other suggestions?
We know that in general, the config tool works so there must be something going on in your environment (configuration, permissions, etc.). Unfortunately, we don't know what the exception is which makes it difficult to diagnose the issue.

I'm curious if it might be a permission issue of some sort. Have you tried running the config tool as Administrator?

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to
Oct 30, 2013 at 7:42 PM
Hi Randy,

I receive the same results when running as administrator. Would you know if any security tools or other service would interfere? We have HB Gary, Tripwire, and Trend Micro OfficeScan running. I did shut down the services for these applications but still receive the error mentioned (even when running as admin).

Thanks,
Eric
Editor
Oct 31, 2013 at 4:18 AM
You could try using the NP .NET Profiler to capture the exception information. Though, I wasn't able to get a stack trace which would be ideal.

I'm assuming you can't debug using Visual Studio on the server so another alternative might be to try to modify the config tool source to add some additional logging (for troubleshooting purposes). e.g. Add an AppDomain.FirstChanceException handler.

~~
Randy Levy
entlib.support@live.com
Enterprise Library support engineer
Support How-to