473,507 Members | 13,917 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Connection String in Registry

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
Nov 18 '05 #1
5 1763
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" <jm***************@formet.com> a écrit dans le message de
news:e8**************@TK2MSFTNGP11.phx.gbl...
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

Nov 18 '05 #2
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" <jm***************@formet.com> wrote in message
news:e8**************@TK2MSFTNGP11.phx.gbl...
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

Nov 18 '05 #3
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" <no****@nowhere.com> wrote in message
news:OI**************@TK2MSFTNGP11.phx.gbl...
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" <jm***************@formet.com> a écrit dans le message de news:e8**************@TK2MSFTNGP11.phx.gbl...
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


Nov 18 '05 #4
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" <jm***************@formet.com> wrote in message
news:OL**************@TK2MSFTNGP09.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:OI**************@TK2MSFTNGP11.phx.gbl...
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" <jm***************@formet.com> a écrit dans le message

de
news:e8**************@TK2MSFTNGP11.phx.gbl...
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



Nov 18 '05 #5
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" <jm***************@formet.com> a écrit dans le message de
news:OL**************@TK2MSFTNGP09.phx.gbl...
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" <no****@nowhere.com> wrote in message
news:OI**************@TK2MSFTNGP11.phx.gbl...
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" <jm***************@formet.com> a écrit dans le message

de
news:e8**************@TK2MSFTNGP11.phx.gbl...
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



Nov 18 '05 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
2835
by: David | last post by:
I am writing SQL data apps using VB.NET 2003, MSDE is being used as the server. When I create and instance of the server, it has a the format machinename/instancename This is fine for the...
3
2127
by: Varun | last post by:
I have a solution which contains windows,web,mobile presentations. Now i want to share the connection string in the web.config file. i want to write a method in a common layer where i can retrieve...
5
40387
by: Alec | last post by:
Hi All, I am currently trying to link in Access 97 to a table in a MSSQL 7 server. Initially the link is fine, however, when I close the access database and re-open it from the same network...
1
1947
by: Gerard Marshall Vignes | last post by:
I was recently cautioned against storing an ADO.NET Connection String in the Windows Registry because access to the Windows Registry would be serialized and therefore impact scalability. I have...
4
2198
by: Krista Lemieux | last post by:
Hello, I know this is probably a hudge topic to discuss and there are lots of different ways of implementation, but I still would like to ask and hear the most commonly used techniques for this....
8
2165
by: John Smith | last post by:
How do I connect to a FoxPro 7 database?
3
6153
by: VB Programmer | last post by:
I have my SQL Server connectionstring in my web.config file. I'm scared that someone will open the file and get my username/password. How do I encrypt, then decrypt the connection string in the...
14
3480
by: WebMatrix | last post by:
Hello, I have developed a web application that connects to 2 different database servers. The connection strings with db username + password are stored in web.config file. After a code review,...
9
4966
by: nbs.tag | last post by:
hey guys heres my question. I was told by a little birdie that .net 2.0 has the ability to read a connection string directly from a registry key. so in the registry key a string value of say :...
7
7467
by: Bill Nguyen | last post by:
I have this connection string using ODBC DSN Dim FactorJaco As String = "dsn=jaco;catalog=factor;uid=user;pwd=passord" This requires an ODBC DSN (jaco) at every client PC. I need to use DSN-less...
0
7221
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7313
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7372
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5619
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5039
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.