473,573 Members | 5,083 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Question about different buils/compiles (dev, test, production enviroment) (Help needed !)

In our company, i have three servers;

1) a development server (mine only - here i make daily changes and test my
stuff)
2) a test server (for the users to test milestone builds - changes weekly)
3) production server (for when a new build is fully tested, and stable)

The problem is that the connectionstrin g in the web.config, should be
replaced with something else, for each of the enviroments.

Another problem is that, i use wsdl.exe to generate proxy classes to
communicate with my webservices. And these have the "this.Url" property
hardcoded to the webservice (starting with the development enviroment -
since that's the first release).

How can I;

1) Easily choose between a Development, Test, Production, so that the the
data in the web.config corresponds to what i want ?
2) Easily change a week old build of my exe, which has build in proxy
classes to the webservices, to point at another webservice ?

I'm looking for a solution that's easy to use from inside .NET, so i don't
have to manage ugly .bat files or something like this.

Thanks.

PS : I know i can put different keys into web.config, and make contants in
my code, but this means i have to recompile. I don't want this, i just want
to change an entire application from the state of (for example)
"developmen t" to "test" with the 'click of a button' :-)
Nov 15 '05 #1
4 2419
1. Strange. Why and where do you have the URL in web.config file? If you
REALLY need url references in web config why didn't you use relative paths?
2. Change the proxy constructor to Service(string ServerURL) and modify
this.url = "http://webserver/blablabla"; to this.url = ServerURL +
"blablabla" ;
Then, on client side you can store the ServerURL string in a file or
something, to retrieve it when the client application starts, and change it
whenever you want to switch to another server.
--
Horatiu Ripa

"Benne Smith" <do**@write.to. me.directly.com > wrote in message
news:3f******** *************@n ews.dk.uu.net.. .
In our company, i have three servers;

1) a development server (mine only - here i make daily changes and test my
stuff)
2) a test server (for the users to test milestone builds - changes weekly)
3) production server (for when a new build is fully tested, and stable)

The problem is that the connectionstrin g in the web.config, should be
replaced with something else, for each of the enviroments.

Another problem is that, i use wsdl.exe to generate proxy classes to
communicate with my webservices. And these have the "this.Url" property
hardcoded to the webservice (starting with the development enviroment -
since that's the first release).

How can I;

1) Easily choose between a Development, Test, Production, so that the the
data in the web.config corresponds to what i want ?
2) Easily change a week old build of my exe, which has build in proxy
classes to the webservices, to point at another webservice ?

I'm looking for a solution that's easy to use from inside .NET, so i don't
have to manage ugly .bat files or something like this.

Thanks.

PS : I know i can put different keys into web.config, and make contants in
my code, but this means i have to recompile. I don't want this, i just want to change an entire application from the state of (for example)
"developmen t" to "test" with the 'click of a button' :-)

Nov 15 '05 #2
Hi, and thanks for your reply.

The "this.Url" is in the generated proxy class (wsdl.exe), not in the
web.config. And if i manually have to update this url, it really a bommer,
because I generate this proxy class, every time i extend my webservice (many
times a day).

In the web.config (the webservices) is located the connectionstrin gs, they
also change for each enviroment.

I see your idea, but it's not nearly flexible enough.

If you have more ideas, please post more.

Thanks !

:-) Benne

"Horatiu Ripa" <un****@busines sco.us> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
1. Strange. Why and where do you have the URL in web.config file? If you
REALLY need url references in web config why didn't you use relative paths? 2. Change the proxy constructor to Service(string ServerURL) and modify
this.url = "http://webserver/blablabla"; to this.url = ServerURL +
"blablabla" ;
Then, on client side you can store the ServerURL string in a file or
something, to retrieve it when the client application starts, and change it whenever you want to switch to another server.
--
Horatiu Ripa

"Benne Smith" <do**@write.to. me.directly.com > wrote in message
news:3f******** *************@n ews.dk.uu.net.. .
In our company, i have three servers;

1) a development server (mine only - here i make daily changes and test my stuff)
2) a test server (for the users to test milestone builds - changes weekly) 3) production server (for when a new build is fully tested, and stable)

The problem is that the connectionstrin g in the web.config, should be
replaced with something else, for each of the enviroments.

Another problem is that, i use wsdl.exe to generate proxy classes to
communicate with my webservices. And these have the "this.Url" property
hardcoded to the webservice (starting with the development enviroment -
since that's the first release).

How can I;

1) Easily choose between a Development, Test, Production, so that the the data in the web.config corresponds to what i want ?
2) Easily change a week old build of my exe, which has build in proxy
classes to the webservices, to point at another webservice ?

I'm looking for a solution that's easy to use from inside .NET, so i don't have to manage ugly .bat files or something like this.

Thanks.

PS : I know i can put different keys into web.config, and make contants in my code, but this means i have to recompile. I don't want this, i just

want
to change an entire application from the state of (for example)
"developmen t" to "test" with the 'click of a button' :-)


Nov 15 '05 #3
You can create different configurations like Debug and Release let say,
Development,Pro duction,Testing

Than you must define for each configuration Conditional Compilation
Constants (in Project Properties) (let say also
Development,Pro duction,Testing )

then define in code some variables depending on the configuration

in c# is like that

#if (Production)
public static String ConnectionStrin g="some connection string...";
#endif

#if (Development)
public static String ConnectionStrin g="other connection string...";
#endif

Then choose the configuration you want and make a build

You also can make different configurations file for each configuration and
set them from configuration properties

Hope this helps

Dan Cimpoiesu

"Benne Smith" <do**@write.to. me.directly.com > wrote in message
news:3f******** *************@n ews.dk.uu.net.. .
Hi, and thanks for your reply.

The "this.Url" is in the generated proxy class (wsdl.exe), not in the
web.config. And if i manually have to update this url, it really a bommer,
because I generate this proxy class, every time i extend my webservice (many times a day).

In the web.config (the webservices) is located the connectionstrin gs, they
also change for each enviroment.

I see your idea, but it's not nearly flexible enough.

If you have more ideas, please post more.

Thanks !

:-) Benne

"Horatiu Ripa" <un****@busines sco.us> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
1. Strange. Why and where do you have the URL in web.config file? If you
REALLY need url references in web config why didn't you use relative paths?
2. Change the proxy constructor to Service(string ServerURL) and modify
this.url = "http://webserver/blablabla"; to this.url = ServerURL +
"blablabla" ;
Then, on client side you can store the ServerURL string in a file or
something, to retrieve it when the client application starts, and change

it
whenever you want to switch to another server.
--
Horatiu Ripa

"Benne Smith" <do**@write.to. me.directly.com > wrote in message
news:3f******** *************@n ews.dk.uu.net.. .
In our company, i have three servers;

1) a development server (mine only - here i make daily changes and test my
stuff)
2) a test server (for the users to test milestone builds - changes weekly) 3) production server (for when a new build is fully tested, and
stable)
The problem is that the connectionstrin g in the web.config, should be
replaced with something else, for each of the enviroments.

Another problem is that, i use wsdl.exe to generate proxy classes to
communicate with my webservices. And these have the "this.Url" property hardcoded to the webservice (starting with the development enviroment - since that's the first release).

How can I;

1) Easily choose between a Development, Test, Production, so that the
the data in the web.config corresponds to what i want ?
2) Easily change a week old build of my exe, which has build in proxy
classes to the webservices, to point at another webservice ?

I'm looking for a solution that's easy to use from inside .NET, so i don't have to manage ugly .bat files or something like this.

Thanks.

PS : I know i can put different keys into web.config, and make
contants in my code, but this means i have to recompile. I don't want this, i just

want
to change an entire application from the state of (for example)
"developmen t" to "test" with the 'click of a button' :-)



Nov 15 '05 #4
hi dan thanks for your reply,

Ah ok ! that helped to understand the configuration changes. but i'll still
need external bat files to generate my webservice proxyclasses to different
url locations (dev, test, prod). everything can't re accomplished from
inside the development enviroment, right ?

an example;

if i change the configuration to Development, and compile, i would like it
to autogenerate proxy classes (wsdl.exe) to a certain url (another url than
Test and Prod).

Thanks !

:-) Benne

"Dan Cimpoiesu" <da**********@g mx.net> wrote in message
news:eW******** ******@TK2MSFTN GP11.phx.gbl...
You can create different configurations like Debug and Release let say,
Development,Pro duction,Testing

Than you must define for each configuration Conditional Compilation
Constants (in Project Properties) (let say also
Development,Pro duction,Testing )

then define in code some variables depending on the configuration

in c# is like that

#if (Production)
public static String ConnectionStrin g="some connection string...";
#endif

#if (Development)
public static String ConnectionStrin g="other connection string...";
#endif

Then choose the configuration you want and make a build

You also can make different configurations file for each configuration and
set them from configuration properties

Hope this helps

Dan Cimpoiesu

"Benne Smith" <do**@write.to. me.directly.com > wrote in message
news:3f******** *************@n ews.dk.uu.net.. .
Hi, and thanks for your reply.

The "this.Url" is in the generated proxy class (wsdl.exe), not in the
web.config. And if i manually have to update this url, it really a bommer,
because I generate this proxy class, every time i extend my webservice

(many
times a day).

In the web.config (the webservices) is located the connectionstrin gs, they also change for each enviroment.

I see your idea, but it's not nearly flexible enough.

If you have more ideas, please post more.

Thanks !

:-) Benne

"Horatiu Ripa" <un****@busines sco.us> wrote in message
news:%2******** ********@TK2MSF TNGP09.phx.gbl. ..
1. Strange. Why and where do you have the URL in web.config file? If you REALLY need url references in web config why didn't you use relative

paths?
2. Change the proxy constructor to Service(string ServerURL) and modify this.url = "http://webserver/blablabla"; to this.url = ServerURL +
"blablabla" ;
Then, on client side you can store the ServerURL string in a file or
something, to retrieve it when the client application starts, and change
it
whenever you want to switch to another server.
--
Horatiu Ripa

"Benne Smith" <do**@write.to. me.directly.com > wrote in message
news:3f******** *************@n ews.dk.uu.net.. .
> In our company, i have three servers;
>
> 1) a development server (mine only - here i make daily changes and test
my
> stuff)
> 2) a test server (for the users to test milestone builds - changes

weekly)
> 3) production server (for when a new build is fully tested, and

stable) >
> The problem is that the connectionstrin g in the web.config, should
be > replaced with something else, for each of the enviroments.
>
> Another problem is that, i use wsdl.exe to generate proxy classes to
> communicate with my webservices. And these have the "this.Url"

property > hardcoded to the webservice (starting with the development enviroment - > since that's the first release).
>
> How can I;
>
> 1) Easily choose between a Development, Test, Production, so that the the
> data in the web.config corresponds to what i want ?
> 2) Easily change a week old build of my exe, which has build in

proxy > classes to the webservices, to point at another webservice ?
>
> I'm looking for a solution that's easy to use from inside .NET, so i

don't
> have to manage ugly .bat files or something like this.
>
> Thanks.
>
> PS : I know i can put different keys into web.config, and make

contants
in
> my code, but this means i have to recompile. I don't want this, i just want
> to change an entire application from the state of (for example)
> "developmen t" to "test" with the 'click of a button' :-)
>
>



Nov 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2577
by: Alex | last post by:
Hi, I have a test system that is setup the same as a production system and would like to frequently copy the database over. pg_dump takes a few hours and even sometimes hangs. Are there any reasons not to simply just copy the entire data directory over to the test system? I could not find any postings on the net suggesting otherwise. Is...
5
6320
by: sql-db2-dba | last post by:
We have DB2 UDB v8.1 fixpak3 on AIX 5. Production and Development configuarations (at least for DB2) are identical albeit production is a 2-way server while development has only one processor. Tables and indexes have the same schema. In fact, the dev database was taken from a prod backup recently. Size of the tables differ slightly. Yet, on a...
6
2660
by: Klaus Jensen | last post by:
Hi! I have a pretty traditional setup where I develop on my local PC and the use "Copy Project" to deploy to the production enviroment.. In web.config I need different values for connectionstrings etc for development and production - pretty normalt stuff. Currently I edit the web.config manually before deploying, and have never forgotten...
3
1281
by: Derek Martin | last post by:
Hi list, I have been doing VB.Net for quite a while now and just now getting into the forray of ASP.Net using VS2003. I have created our development website and now we are ready to start putting it into production. I've messed around with a few different deployment scenarios but the one we ended up with was two copies of the code, one on...
2
2025
by: sqlster | last post by:
We have 3 different environments: dev, qa, and production. After unit testing, the application is deployed to dev for unit testing among the programmers and business analyst. When that is okay it gets deployed to QA for other qa teams to test. When that is approved, it gets deployed to production. For each environment we have web.config in...
17
5055
by: romixnews | last post by:
Hi, I'm facing the problem of analyzing a memory allocation dynamic and object creation dynamics of a very big C++ application with a goal of optimizing its performance and eventually also identifying memory leaks. The application in question is the Mozilla Web Browser. I also have had similar tasks before in the compiler construction area....
10
2035
by: eagle | last post by:
I have a web.config in my application that contains the connection strings to all my datasources. I want to move these connection strings to another web config up the folder hierarchy so that all my apps can use the same connection strings. That is supposed to be how it's done, no? Instead of the web.config being in...
0
271
by: A. Fuentes | last post by:
Fellow Oracle Netters: I have the following problem: Enviroment: Oracle9i/AIX5.2/Veritas vxvm I am trying to create an Oracle database using RAW devices UNDER the Veritas vxvm.(Veritas Volume Manager). Brief Antecedents:
0
1657
by: norseman | last post by:
mercado mercado wrote: ========================================================== Yes, but you may not like it. I do what you do. Prod and devel subdirs. I store the paths in a var at the top of my programs. I change it(them) when the program graduates. example:
0
8215
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7800
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8086
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5605
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5296
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3737
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3743
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1325
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1048
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.