By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,993 Members | 1,984 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,993 IT Pros & Developers. It's quick & easy.

Enterprise Library exception: The configuration section securityCryptographyConfiguration is not defined in the current configuration for the AppDomain.

P: n/a
I am attempting to use the Enterprise Library (Jan 2006) Cryptography block
to encrypt a credit card number in my ASP.NET 2.0 Commerce Server
application. Everything is configured correctly, as evidenced by the fact
that it is running on a production box using the same web.config (but not
the same parent web.config). When I call the EncryptSymmetric() method, I
get this error:

Server Error in '/Store' Application.
--------------------------------------------------------------------------------

The configuration section securityCryptographyConfiguration is not defined
in the current configuration for the AppDomain.
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more information
about the error and where it originated in the code.

Exception Details: System.Configuration.ConfigurationErrorsException: The
configuration section securityCryptographyConfiguration is not defined in
the current configuration for the AppDomain.

Source Error:

[No relevant source lines]

Source File: **************** Omitted ************************** Line:
933

Stack Trace:

[ConfigurationErrorsException: The configuration section
securityCryptographyConfiguration is not defined in the current
configuration for the AppDomain.]
Microsoft.Practices.EnterpriseLibrary.Security.Cry ptography.CryptographyConfigurationView.get_Crypto graphySettings()
+202
Microsoft.Practices.EnterpriseLibrary.Security.Cry ptography.CryptographyConfigurationView.GetSymetri cCryptoProviderData(String
symetricCryptoProviderName) +130
Microsoft.Practices.EnterpriseLibrary.Security.Cry ptography.SymmetricCryptoProviderCustomFactory.Get Configuration(String
name, IConfigurationSource configurationSource) +59
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.AssemblerBasedCustomFactory `2.Create(IBuilderContext
context, String name, IConfigurationSource configurationSource,
ConfigurationReflectionCache reflectionCache) +51
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.AssemblerBasedCustomFactory `2.CreateObject(IBuilderContext
context, String name, IConfigurationSource configurationSource,
ConfigurationReflectionCache reflectionCache) +16
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.ConfiguredObjectStrategy.Bu ildUp(IBuilderContext
context, Type t, Object existing, String id) +71
Microsoft.Practices.ObjectBuilder.BuilderStrategy. BuildUp(IBuilderContext
context, Type typeToBuild, Object existing, String idToBuild) +93
Microsoft.Practices.ObjectBuilder.SingletonStrateg y.BuildUp(IBuilderContext
context, Type typeToBuild, Object existing, String idToBuild) +235
Microsoft.Practices.ObjectBuilder.BuilderStrategy. BuildUp(IBuilderContext
context, Type typeToBuild, Object existing, String idToBuild) +93
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.ConfigurationNameMappingStr ategy.BuildUp(IBuilderContext
context, Type t, Object existing, String id) +88
Microsoft.Practices.ObjectBuilder.BuilderBase`1.Do BuildUp(IReadWriteLocator
locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
transientPolicies) +339
Microsoft.Practices.ObjectBuilder.BuilderBase`1.Bu ildUp(IReadWriteLocator
locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
transientPolicies) +194
Microsoft.Practices.ObjectBuilder.BuilderBase`1.Bu ildUp(IReadWriteLocator
locator, String idToBuild, Object existing, PolicyList[] transientPolicies)
+111
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.EnterpriseLibraryFactory.Bu ildUp(IReadWriteLocator
locator, String id, IConfigurationSource configurationSource) +170
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.EnterpriseLibraryFactory.Bu ildUp(String
id, IConfigurationSource configurationSource) +64
Microsoft.Practices.EnterpriseLibrary.Common.Confi guration.ObjectBuilder.NameTypeFactoryBase`1.Creat e(String
name) +52
Microsoft.Practices.EnterpriseLibrary.Security.Cry ptography.Cryptographer.EncryptSymmetric(String
symmetricInstance, Byte[] plaintext) +236
Microsoft.Practices.EnterpriseLibrary.Security.Cry ptography.Cryptographer.EncryptSymmetric(String
symmetricInstance, String plaintext) +161
[ Additional lines omitted... ]

My web.config contains the following (relevant) sections:
<configuration>

<configSections>

<section name="securityCryptographyConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Securi ty.Cryptography.Configuration.CryptographySettings ,
Microsoft.Practices.EnterpriseLibrary.Security.Cry ptography,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58d6fbf09c89f721" />

</configSections>

<securityCryptographyConfiguration>

<symmetricCryptoProviders>

<add algorithmType="System.Security.Cryptography.Rijnda elManaged, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"

protectedKeyFilename="C:\webstore.key"

protectedKeyProtectionScope="LocalMachine"
type="Microsoft.Practices.EnterpriseLibrary.Securi ty.Cryptography.SymmetricAlgorithmProvider,
Microsoft.Practices.EnterpriseLibrary.Security.Cry ptography,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=58d6fbf09c89f721"

name="RijndaelManaged" />

</symmetricCryptoProviders>

</securityCryptographyConfiguration>

</configuration>
Sep 20 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hello Jess,

Regarding on this issue, I've also seen your another duplicated thread in
the microsoft.public.dotnet.distributed_apps newsgroup. I've posted some
suggestion here. Please feel free to followup there if you have any further
questions or finding.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 21 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.