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?
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.
, , , :
- - , - ( ). , , .
, -, - .
, . , , (, , ..).
, . , , - . , , .
-, :
msbuild /t:deploy
$(SERVER)
$(USERNAME)
msbuild /t:deploy /p:server=test
msbuild /t:deploy /p:server=live
/p:secret=foo
, dev test to prod, . , , . ( - )
FYI, :
Java-Webapps ?
. , , , dev . , , /, .
, dev, stage production. , , , , - . , dev production, config.
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.).
Source: https://habr.com/ru/post/1697233/More articles:Reduce the startup time of a .NET windows form application that has a network drive running - performanceIs there an easy way to get Apache Tomcat to automatically reboot after deployment? - javaΠ§ΡΠΎ ΡΠΎΠ·Π΄Π°Π΅Ρ CMS Ρ ΠΎΡΠΊΡΡΡΡΠΌ ΠΈΡΡ ΠΎΠ΄Π½ΡΠΌ ΠΊΠΎΠ΄ΠΎΠΌ: Π³Π΅Π½Π΅ΡΠΈΡΡΠ΅Ρ ΡΠΈΡΡΡΠΉ xhtml, Π΄ΠΎΡΡΡΠΏΠ΅Π½ Π΄Π»Ρ ΡΠΊΠΈΠ½ΠΎΠ² Ρ ΠΏΠΎΠΌΠΎΡΡΡ css ΠΈ ΠΈΠΌΠ΅Π΅Ρ Π»Π΅Π³ΠΊΠΈΠΉ ΡΠ΅Π΄Π°ΠΊΡΠΎΡ ΡΠΎΠ΄Π΅ΡΠΆΠΈΠΌΠΎΠ³ΠΎ ΡΠ°Π·ΠΌΠ΅ΡΠΊΠΈ? - language-agnosticAn automated way to detect tests that cannot fail are checked to get minmum code coverage? - build-automationΠ‘ΡΡΠ΅ΡΡΠ²ΡΠ΅Ρ Π»ΠΈ ΠΌΠΎΠ΄Π΅Π»Ρ ΡΡΠ°ΡΡΠΈΡΠΎΠ²ΠΊΠΈ Π»ΡΡΠ΅ΠΉ Π½Π° Java, ΠΊΠΎΡΠΎΡΠ°Ρ ΠΌΠΎΠΆΠ΅Ρ Π±ΡΡΡ Π°Π΄Π°ΠΏΡΠΈΡΠΎΠ²Π°Π½Π° Π΄Π»Ρ ΠΈΡΠΏΠΎΠ»ΡΠ·ΠΎΠ²Π°Π½ΠΈΡ Π² ΠΏΠΎΠ΄Π²ΠΎΠ΄Π½ΠΎΠΉ Π°ΠΊΡΡΡΠΈΠΊΠ΅? - javaIs there any performance advantage with the "chaining" in .NET? - performanceF # ΠΈ ΠΊΠΎΡΠΏΠΎΡΠ°ΡΠΈΠ²Π½ΠΎΠ΅ ΠΏΡΠΎΠ³ΡΠ°ΠΌΠΌΠ½ΠΎΠ΅ ΠΎΠ±Π΅ΡΠΏΠ΅ΡΠ΅Π½ΠΈΠ΅ - c#Primary VmWare Hard Drive Extension - vmwareSEO and hard links with dynamic URLs - seoperl JOIN-like behavior in Oracle? - oracleAll Articles