Where to put the Connection String

  • Thread starter Thread starter tshad
  • Start date Start date
T

tshad

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
 
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!
*************************************************
 
Cowboy (Gregory A. Beamer) said:
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
 
Back
Top