I have created an ASP.NET application which is deployed on Azure.
Every time whenever I want to publish it on Azure, I make use of a staging server to deploy and after testing everything on staging, I just swap both of them.
But there is a problem, I have some startup tasks that create some scheduled tasks for cron jobs. So, these task are also copied to production server from staging and cron jobs are run two times one on production and second in staging. But I want them only to run on production not on staging.
How can I prevent this duplicated cron job problem? Please give me some suggestions.
This architecture allows the staging mode server to be located in a different datacenter. To apply this method, follow these steps: Install Azure AD Connect, select staging mode, and unselect start synchronization on the last page in the installation wizard. This mode allows you to run the sync engine manually.
If you have made custom changes to the primary server and want to compare the configuration with the staging server, then use Azure AD Connect configuration documenter. Select Connectors, and select the first Connector with the type Active Directory Domain Services. Click Run, select Full import, and OK.
Sign off/sign in and from the start menu select Synchronization Service. If you have made custom changes to the primary server and want to compare the configuration with the staging server, then use Azure AD Connect configuration documenter. Select Connectors, and select the first Connector with the type Active Directory Domain Services.
When you clone configuration from another deployment slot, the cloned configuration is editable. Some configuration elements follow the content across a swap (not slot specific), whereas other configuration elements stay in the same slot after a swap (slot specific). The following lists show the settings that change when you swap slots.
There is no easy way in order to distuinguish staging and production environments. If I do remember correctly, you could use the Server Management REST Api to get more details about the current deployment. You just need to get the RoleEnvironment.DeploymentId and communicate with the REST Api by providing a valid X509 Certificate.
http://msdn.microsoft.com/en-us/library/windowsazure/ee460806.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With