How do you maintain separate web services for dev / stage / production

We want to support 3 web services for different stages of deployment, but how do we determine in our application which service to use? We just support 3 web links and if their use is somehow?

+3
source share
8 answers

As already mentioned, you want to save this information in a configuration file. In fact, I would suggest using a different configuration file for each environment. This will take into account the inevitable problem of having multiple settings for each environment, for example. you can have separate settings for the web service url and web service port or have additional settings for working with https / security.

, , , :

- - , - ( ). , , .

, -, - .

+4

, . , , (, , ..).

+10

, . , , - . , , .

+3

-, :

  • msbuild /t:deploy , , dev-specific. $(SERVER) $(USERNAME).
  • msbuild /t:deploy /p:server=test , -devs.
  • msbuild /t:deploy /p:server=live . , , , /p:secret=foo, , .
+2

, dev test to prod, . , , . ( - )

+1
+1

. , , , dev . , , /, .

, dev, stage production. , , , , - . , dev production, config.

0

Instead of using web links, create proxy classes from the WSDL web service using wsdl.exe . Generated classes will have the Url property, which can be set depending on the deployment stage (dev, qa, production, etc.).

0
source

Source: https://habr.com/ru/post/1697233/


All Articles