Pointing to registry from Web.config file

  • Thread starter Thread starter Adnan Selimovic
  • Start date Start date
A

Adnan Selimovic

Hi folks! I have Framework 1.0 installed and I would like to point to
registry from my Web.config file:

<connectionString>
<add key="password" value="registry:HKLM\Software\Foo,password" />
<add key="userID" value="registry:HKLM\Software\Foo,userID" />
<add key="initialCatalog"
value="registry:HKLM\Software\Foo,initialCatalog" />
<add key="dataSource" value="registry:HKLM\Software\Foo,dataSource" />
<add key="integratedSecurity"
value="registry:HKLM\Software\Foo,integratedSecurity" />
</connectionString>

When I read the values using the ConfigurationSettings.GetConfig method I
get the value entered in the config file and not the one in the registry.
Do I need to have a patch mentioned in the KB 329259 to have this work?

Cheers,

Adnan
 
Configuration.GetConfig method reads the contents of the web.config file.
If you want to read from the Windows registry, you will need to implement
your own code.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top