Pointing to registry from Web.config file

  • Thread starter Adnan Selimovic
  • 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
 
P

Peter O'Reilly

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

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top