How can I change a ConnectionString depending on the dev or prod environment ?

G

Gilbert Tordeur

Hello,

It is about a VB2008 intranet application. It uses a SQL Server database.
The ConnectionString is defined in the
connectionStrings section of the web.config file. This application uses
ObjectDataSource objects, defined in design mode.

I would like to use a different database depending on the execution
environment (development or production).

I can test the environment by retrieving the IIS server name. I could of
course change the web.config file by hand, but every time I will publish
from dev to prod I should do the change again.Of course, a day or another
there will be a forgetting or a mistake.

Can anybody propose an automatic solution?

Thank you in advance,
Gilbert
 
G

Gilbert Tordeur

Thank you Jeff for your suggestion. I didn't even know the existence of this
tool.
have a good day,
Gilbert
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top