Development vs. Production environment

U

UJ

How do people handle in the code when you have a production and development
system? I'm using VS.Net with C# and VB.Net. Do I make references to each
and then do something in the code or is there are any way do I don't have to
always remember to change the reference right before making a new version?

Can I put the actual address in the .config file and use it from there?

TIA - Jeff.
 
P

Piyush Thakuria

There are 2 ways of doing it:
1. Tightly Bind your application with a web reference and create two MSI's -
one for Production environment and the other for Development environment. So
you Production MSI is pointing to your production web service and the
Development MSI is pointing to the development web service.
2. Loosly bind the application with your web service. Dynamically assign the
URL to the web service using the following code:

DummyService.Url = ConfigurationSettings.AppSettings[valueToRead];

Your valueToRead would be the URL of the production and development boxes.
Just comment and uncomment the URL, you want to use.

Please revert back if the above mentioned solutions worked for you.
 
U

UJ

Thanks. I'll probably go with #2.

Jeff.

Piyush Thakuria said:
There are 2 ways of doing it:
1. Tightly Bind your application with a web reference and create two
MSI's -
one for Production environment and the other for Development environment.
So
you Production MSI is pointing to your production web service and the
Development MSI is pointing to the development web service.
2. Loosly bind the application with your web service. Dynamically assign
the
URL to the web service using the following code:

DummyService.Url = ConfigurationSettings.AppSettings[valueToRead];

Your valueToRead would be the URL of the production and development boxes.
Just comment and uncomment the URL, you want to use.

Please revert back if the above mentioned solutions worked for you.


--
Piyush Thakuria
Technical Lead
Microsoft Technologies
Wipro


UJ said:
How do people handle in the code when you have a production and
development
system? I'm using VS.Net with C# and VB.Net. Do I make references to each
and then do something in the code or is there are any way do I don't have
to
always remember to change the reference right before making a new
version?

Can I put the actual address in the .config file and use it from there?

TIA - Jeff.
 

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

Members online

No members online now.

Forum statistics

Threads
473,996
Messages
2,570,238
Members
46,826
Latest member
robinsontor

Latest Threads

Top