473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 1759
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
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
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
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
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
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
by: John Smith | last post by:
How do I connect to a FoxPro 7 database?
3
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
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
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
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
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...

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.