I am using Cryptography application block and am trying to use
configSource attribute to keep the config file as separate file.
my Application configuration file has following entry
App.config
<configuration>
<configSections>
<section name="dataConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Data.C onfiguration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=null" />
<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=null" />
</configSections>
<connectionStrings configSource="data.config" />
<securityCryptographyConfiguration>
<symmetricCryptoProviders configSource="crypto.config"/>
</securityCryptographyConfiguration>
</configuration>
and external cryotography configuration file is.
crypto.config
<configuration>
<symmetricCryptoProviders>
<add name="RijndaelManaged"
algorithmType="System.Security.Cryptography.Rijnda elManaged, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
protectedKeyFilename="E:\Configuration\Configurati on\bin\Debug\KeyFile.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=null"
/>
</symmetricCryptoProviders>
</configuration>
in code i am calling it as
textBox2.Text = Cryptographer.EncryptSymmetric("RijndaelManaged",
textBox1.Text);
on running this i get error as.
{"Unrecognized attribute 'configSource'. Note that attribute names are
case-sensitive.
(E:\\Configuration\\Configuration\\bin\\Debug\\Con figuration.vshost.exe.config
line 10)"}
Although similer setting is working with database application block.
Thanks
Abhi. 1 8959
It loooks to me like you are using the vshost.exe.config file instead of the
application's config file which would be <applicationName>.exe.config
Peter
--
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
Short urls & more: http://ittyurl.net
"Abhi" wrote:
I am using Cryptography application block and am trying to use
configSource attribute to keep the config file as separate file.
my Application configuration file has following entry
App.config
<configuration>
<configSections>
<section name="dataConfiguration"
type="Microsoft.Practices.EnterpriseLibrary.Data.C onfiguration.DatabaseSettings,
Microsoft.Practices.EnterpriseLibrary.Data, Version=2.0.0.0,
Culture=neutral, PublicKeyToken=null" />
<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=null" />
</configSections>
<connectionStrings configSource="data.config" />
<securityCryptographyConfiguration>
<symmetricCryptoProviders configSource="crypto.config"/>
</securityCryptographyConfiguration>
</configuration>
and external cryotography configuration file is.
crypto.config
<configuration>
<symmetricCryptoProviders>
<add name="RijndaelManaged"
algorithmType="System.Security.Cryptography.Rijnda elManaged, mscorlib,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
protectedKeyFilename="E:\Configuration\Configurati on\bin\Debug\KeyFile.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=null"
/>
</symmetricCryptoProviders>
</configuration>
in code i am calling it as
textBox2.Text = Cryptographer.EncryptSymmetric("RijndaelManaged",
textBox1.Text);
on running this i get error as.
{"Unrecognized attribute 'configSource'. Note that attribute names are
case-sensitive.
(E:\\Configuration\\Configuration\\bin\\Debug\\Con figuration.vshost.exe.config
line 10)"}
Although similer setting is working with database application block.
Thanks
Abhi.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Ian Griffiths |
last post by:
I have been given a schema, instances of which I'm required to be able to
consume and generate. I'd like to be able to manipulate these instances as
DataSets internally in my application. The...
|
by: Brice Prunier |
last post by:
Here under 4 schemas i'm working with ( it may be long: sorry...)
The context is the following :
Resident.xsd imports Person.xsd and includes Common.xsd ( anonimous schema:
no TargetNamespace )...
|
by: SeeSharp |
last post by:
..NET 2.0 has a great feature where you can remove certain elements from
your web.config and put them in an external file. For example the
membership element has the configSource attribute and you...
|
by: Petterson Mikael |
last post by:
Hi,
I am using xalan. In my stylesheet I have the following snippet to write
to std out when a specific error occurs.
<xsl:template name="class_error">
<xsl:param name="class"/>
<xsl:param...
|
by: rautsmita |
last post by:
hello friends ,
i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
|
by: Sukrity |
last post by:
Hi,
We are planning to bind assemblies to our application using the runtime element in the app.config file. However since we have more than one applications that will be using the shared...
|
by: suganthy |
last post by:
Hi Frnz,
I have problem in validating my website,using wc3 validation control,
Here the following error i got while debugging my layout.can any one find solution to this problem.
# Line 489,...
|
by: Junior |
last post by:
Vista SP1 IIS7
I'm trying to configure web.config following MSDN docs but keep getting
errors I don't know how to resolve..
<configuration>
<!--error-->
<appSettings...
|
by: gozlemci |
last post by:
Hi everybody;
During my coding, I have encountered a problem.I appreciate if anybody answer it.
Here is the simplified code:
//Header5.h
#pragma once
#include <string>
using namespace std;
|
by: DolphinDB |
last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation.
Take...
|
by: ryjfgjl |
last post by:
ExcelToDatabase: batch import excel into database automatically...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: Shællîpôpï 09 |
last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
| |