Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Connection String in Registry

Reply
Thread Tools

Connection String in Registry

 
 
Jason MacKenzie
Guest
Posts: n/a
 
      04-15-2004
I store my connection string in the registry. Is it possible to access this
value from the web.config file? If so any help is appreciated.

Thanks,

Jason


 
Reply With Quote
 
 
 
 
Kevin Spencer
Guest
Posts: n/a
 
      04-15-2004
As the web.config file is simply text, no. You could load it from your
Application_OnStart Event Handler, though.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Jason MacKenzie" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I store my connection string in the registry. Is it possible to access

this
> value from the web.config file? If so any help is appreciated.
>
> Thanks,
>
> Jason
>
>



 
Reply With Quote
 
 
 
 
Patrice
Guest
Posts: n/a
 
      04-15-2004
I saw once :

http://msdn.microsoft.com/library/de...itysection.asp

That said I don't know if the "registry:" syntax is only supported in this
particular case or is a general option. Let us know if you test please...

Patrice


"Jason MacKenzie" <(E-Mail Removed)> a écrit dans le message de
news:(E-Mail Removed)...
> I store my connection string in the registry. Is it possible to access

this
> value from the web.config file? If so any help is appreciated.
>
> Thanks,
>
> Jason
>
>



 
Reply With Quote
 
Jason MacKenzie
Guest
Posts: n/a
 
      04-15-2004
That's actually where I got the idea but it doesn't seem to be working at
all:

I would like to do something like this:

<appSettings>
<add key="ConnString"
value="registry:HKLM\SOFTWARE\Intranet\ProjectTrac kingConfiguration,
ConnectionString" />
</appSettings>



"Patrice" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> I saw once :
>
>

http://msdn.microsoft.com/library/de...itysection.asp
>
> That said I don't know if the "registry:" syntax is only supported in this
> particular case or is a general option. Let us know if you test please...
>
> Patrice
>
>
> "Jason MacKenzie" <(E-Mail Removed)> a écrit dans le message

de
> news:(E-Mail Removed)...
> > I store my connection string in the registry. Is it possible to access

> this
> > value from the web.config file? If so any help is appreciated.
> >
> > Thanks,
> >
> > Jason
> >
> >

>
>



 
Reply With Quote
 
Curt_C [MVP]
Guest
Posts: n/a
 
      04-15-2004
most likely the user that your app runs as doesn't have permission for the
registry either

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com


"Jason MacKenzie" <(E-Mail Removed)> wrote in message
news:OLa$(E-Mail Removed)...
> That's actually where I got the idea but it doesn't seem to be working at
> all:
>
> I would like to do something like this:
>
> <appSettings>
> <add key="ConnString"
> value="registry:HKLM\SOFTWARE\Intranet\ProjectTrac kingConfiguration,
> ConnectionString" />
> </appSettings>
>
>
>
> "Patrice" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I saw once :
> >
> >

>

http://msdn.microsoft.com/library/de...itysection.asp
> >
> > That said I don't know if the "registry:" syntax is only supported in

this
> > particular case or is a general option. Let us know if you test

please...
> >
> > Patrice
> >
> >
> > "Jason MacKenzie" <(E-Mail Removed)> a écrit dans le message

> de
> > news:(E-Mail Removed)...
> > > I store my connection string in the registry. Is it possible to access

> > this
> > > value from the web.config file? If so any help is appreciated.
> > >
> > > Thanks,
> > >
> > > Jason
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
Patrice
Guest
Posts: n/a
 
      04-16-2004
According to http://support.microsoft.com/default...b;en-us;329290,
it looks like that this is restricted to particular sections :

When you apply the hotfix that is described in Microsoft Knowledge Base
article 329250 (see "References"), you can use encrypted data that is stored
in the registry instead of plain text in the following configuration
sections:
a.. <identity userName= password= />
b.. <processModel userName= password= />
c.. <sessionState stateConnectionString= sqlConnectionString= />
IMO, the best location is still the web.config file (this way you have all
settings in this unique file) possibly encrypted first...

Patrice


"Jason MacKenzie" <(E-Mail Removed)> a écrit dans le message de
news:OLa$(E-Mail Removed)...
> That's actually where I got the idea but it doesn't seem to be working at
> all:
>
> I would like to do something like this:
>
> <appSettings>
> <add key="ConnString"
> value="registry:HKLM\SOFTWARE\Intranet\ProjectTrac kingConfiguration,
> ConnectionString" />
> </appSettings>
>
>
>
> "Patrice" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > I saw once :
> >
> >

>

http://msdn.microsoft.com/library/de...itysection.asp
> >
> > That said I don't know if the "registry:" syntax is only supported in

this
> > particular case or is a general option. Let us know if you test

please...
> >
> > Patrice
> >
> >
> > "Jason MacKenzie" <(E-Mail Removed)> a écrit dans le message

> de
> > news:(E-Mail Removed)...
> > > I store my connection string in the registry. Is it possible to access

> > this
> > > value from the web.config file? If so any help is appreciated.
> > >
> > > Thanks,
> > >
> > > Jason
> > >
> > >

> >
> >

>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help:win95 registry vs. winxp registry wege Computer Support 3 06-09-2006 06:28 PM
How to read a registry key from Windows registry ? Leny Java 3 02-01-2005 07:54 AM
Interpretation of registry log of tweakui produced registry alteration vincemoon@rcn.com ASP .Net 0 01-10-2005 02:53 AM
Reading registry key throws "Requested registry access is not allowed." HK ASP .Net 1 04-01-2004 04:44 PM



Advertisments