PC Review Forums Newsgroups Microsoft DotNet Microsoft ADO .NET Where to put the Connection String

Reply

Where to put the Connection String

 
Thread Tools Rate Thread
Old 15-09-2006, 05:31 PM   #1
tshad
Guest
 
Posts: n/a
Default Where to put the Connection String


I am trying to find the best place to put my connection string.

For my websites, I put it in the web.config file. But since I have multiple
web sites, I have multiple strings to handle whenever I make a change to the
string.

Then there is the issue of my executables and Windows Services - where is
the best place to put the connection. I don't want to put it inside each
program, where I would need to rebuild each program if the string changes,
or in the registry as this may be on different machines.

Thanks,

Tom


  Reply With Quote
Old 15-09-2006, 07:48 PM   #2
Cowboy \(Gregory A. Beamer\)
Guest
 
Posts: n/a
Default Re: Where to put the Connection String

Even with programs, you can place it in config files. Another option is to
make a service that feeds the programs (both web and windows) and have it
hit when the program starts up. You can register this service in your UDDI
server. If you put the database stuff on a service, you can put that service
in UDDI. Then, the only change to config is where UDDI is.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************************************************
Think outside of the box!
*************************************************
"tshad" <tscheiderich@ftsolutions.com> wrote in message
news:%23B7xaRO2GHA.1040@TK2MSFTNGP06.phx.gbl...
>I am trying to find the best place to put my connection string.
>
> For my websites, I put it in the web.config file. But since I have
> multiple web sites, I have multiple strings to handle whenever I make a
> change to the string.
>
> Then there is the issue of my executables and Windows Services - where is
> the best place to put the connection. I don't want to put it inside each
> program, where I would need to rebuild each program if the string changes,
> or in the registry as this may be on different machines.
>
> Thanks,
>
> Tom
>



  Reply With Quote
Old 21-09-2006, 06:47 PM   #3
tshad
Guest
 
Posts: n/a
Default Re: Where to put the Connection String

"Cowboy (Gregory A. Beamer)" <NoSpamMgbworld@comcast.netNoSpamM> wrote in
message news:%23sKLMeP2GHA.4796@TK2MSFTNGP06.phx.gbl...
> Even with programs, you can place it in config files. Another option is to
> make a service that feeds the programs (both web and windows) and have it
> hit when the program starts up. You can register this service in your UDDI
> server. If you put the database stuff on a service, you can put that
> service in UDDI. Then, the only change to config is where UDDI is.


Where would I find oub about this?

What is a UDDI Server?

Isn't this dangerous to be passing your connection string over the network?
Is it encoded?

Thanks,

Tom
>
> --
> Gregory A. Beamer
> MVP; MCP: +I, SE, SD, DBA
>
> *************************************************
> Think outside of the box!
> *************************************************
> "tshad" <tscheiderich@ftsolutions.com> wrote in message
> news:%23B7xaRO2GHA.1040@TK2MSFTNGP06.phx.gbl...
>>I am trying to find the best place to put my connection string.
>>
>> For my websites, I put it in the web.config file. But since I have
>> multiple web sites, I have multiple strings to handle whenever I make a
>> change to the string.
>>
>> Then there is the issue of my executables and Windows Services - where is
>> the best place to put the connection. I don't want to put it inside each
>> program, where I would need to rebuild each program if the string
>> changes, or in the registry as this may be on different machines.
>>
>> Thanks,
>>
>> Tom
>>

>
>



  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off