Enterprise Library exception: The configuration section securityCryptographyConfiguration is not def

Discussion in 'ASP .Net' started by Jess Chadwick, Sep 20, 2006.

  1. 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.Cryptography.CryptographyConfigurationView.get_CryptographySettings()
    +202
    Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.CryptographyConfigurationView.GetSymetricCryptoProviderData(String
    symetricCryptoProviderName) +130
    Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.SymmetricCryptoProviderCustomFactory.GetConfiguration(String
    name, IConfigurationSource configurationSource) +59
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory`2.Create(IBuilderContext
    context, String name, IConfigurationSource configurationSource,
    ConfigurationReflectionCache reflectionCache) +51
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.AssemblerBasedCustomFactory`2.CreateObject(IBuilderContext
    context, String name, IConfigurationSource configurationSource,
    ConfigurationReflectionCache reflectionCache) +16
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.ConfiguredObjectStrategy.BuildUp(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.SingletonStrategy.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.Configuration.ObjectBuilder.ConfigurationNameMappingStrategy.BuildUp(IBuilderContext
    context, Type t, Object existing, String id) +88
    Microsoft.Practices.ObjectBuilder.BuilderBase`1.DoBuildUp(IReadWriteLocator
    locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
    transientPolicies) +339
    Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator
    locator, Type typeToBuild, String idToBuild, Object existing, PolicyList[]
    transientPolicies) +194
    Microsoft.Practices.ObjectBuilder.BuilderBase`1.BuildUp(IReadWriteLocator
    locator, String idToBuild, Object existing, PolicyList[] transientPolicies)
    +111
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp(IReadWriteLocator
    locator, String id, IConfigurationSource configurationSource) +170
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.EnterpriseLibraryFactory.BuildUp(String
    id, IConfigurationSource configurationSource) +64
    Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder.NameTypeFactoryBase`1.Create(String
    name) +52
    Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.Cryptographer.EncryptSymmetric(String
    symmetricInstance, Byte[] plaintext) +236
    Microsoft.Practices.EnterpriseLibrary.Security.Cryptography.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.Security.Cryptography.Configuration.CryptographySettings,
    Microsoft.Practices.EnterpriseLibrary.Security.Cryptography,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=58d6fbf09c89f721" />

    </configSections>

    <securityCryptographyConfiguration>

    <symmetricCryptoProviders>

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

    protectedKeyFilename="C:\webstore.key"

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

    name="RijndaelManaged" />

    </symmetricCryptoProviders>

    </securityCryptographyConfiguration>

    </configuration>
     
    Jess Chadwick, Sep 20, 2006
    #1
    1. Advertising

  2. 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.
     
    Steven Cheng[MSFT], Sep 21, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jiong Feng
    Replies:
    0
    Views:
    844
    Jiong Feng
    Nov 19, 2003
  2. Mark
    Replies:
    0
    Views:
    832
  3. Sean Ross
    Replies:
    3
    Views:
    128
    Aredridel
    Dec 25, 2003
  4. Replies:
    7
    Views:
    162
  5. planetthoughtful

    Newbie: def must come before call to def?

    planetthoughtful, Mar 12, 2007, in forum: Ruby
    Replies:
    4
    Views:
    133
    Pit Capitain
    Mar 12, 2007
Loading...

Share This Page