Web Slot

-->

  1. Play Slots Online For Money
  2. Web Slot Machine
  3. Web Solutions Of America
  4. Web Slot Terbaik

Template format

To create a Microsoft.Web/sites/slots resource, add the following JSON to the resources section of your template.

New Slot Site February 2021. The most up to date list of Slot Sites online. Browse every New Slots Site that opened in February 2021!.Our list of the newest slot sites uses Geo-Targeting so players from multiple countries can view the latest new slot sites. Dodge City Slots. Dodge City Slots. Dog Pound Dollars. Dog Pound Dollars. Dollars to Donuts. Dollars to Donuts. Free Slots – Play 7780+ Free Online Casino Games. You’ve just discovered the biggest online, free slots library. Like thousands of slots players who use VegasSlotsOnline.com every day, you now have instant access to over 7780 free online slots that you can play right here.

Property values

The following tables describe the values you need to set in the schema.

Microsoft.Web/sites/slots object

NameTypeRequiredValue
namestringYesName of the deployment slot to create or update. By default, this API attempts to create or modify the production slot.
typeenumYesslots
-or-
Microsoft.Web/sites/slots
See Set name and type for child resources.
apiVersionenumYes2020-09-01
kindstringNoKind of resource.
locationstringYesResource Location.
tagsobjectNoResource tags.
systemDataobjectNoThe system metadata relating to this resource. - SystemData object
propertiesobjectYesSite resource specific properties - SiteProperties object
identityobjectNoManagedServiceIdentity object
resourcesarrayNo

SystemData object

NameTypeRequiredValue
createdBystringNoThe identity that created the resource.
createdByTypeenumNoThe type of identity that created the resource. - User, Application, ManagedIdentity, Key
lastModifiedAtstringNoThe type of identity that last modified the resource.

SiteProperties object

NameTypeRequiredValue
enabledbooleanNotrue if the app is enabled; otherwise, false. Setting this value to false disables the app (takes the app offline).
hostNameSslStatesarrayNoHostname SSL states are used to manage the SSL bindings for app's hostnames. - HostNameSslState object
serverFarmIdstringNoResource ID of the associated App Service plan, formatted as: '/subscriptions/{subscriptionID}/resourceGroups/{groupName}/providers/Microsoft.Web/serverfarms/{appServicePlanName}'.
reservedbooleanNotrue if reserved; otherwise, false.
isXenonbooleanNoObsolete: Hyper-V sandbox.
hyperVbooleanNoHyper-V sandbox.
siteConfigobjectNoConfiguration of the app. - SiteConfig object
scmSiteAlsoStoppedbooleanNotrue to stop SCM (KUDU) site when the app is stopped; otherwise, false. The default is false.
hostingEnvironmentProfileobjectNoApp Service Environment to use for the app. - HostingEnvironmentProfile object
clientAffinityEnabledbooleanNotrue to enable client affinity; false to stop sending session affinity cookies, which route client requests in the same session to the same instance. Default is true.
clientCertEnabledbooleanNotrue to enable client certificate authentication (TLS mutual authentication); otherwise, false. Default is false.
clientCertModeenumNoThis composes with ClientCertEnabled setting.- ClientCertEnabled: false means ClientCert is ignored.- ClientCertEnabled: true and ClientCertMode: Required means ClientCert is required.- ClientCertEnabled: true and ClientCertMode: Optional means ClientCert is optional or accepted. - Required or Optional
clientCertExclusionPathsstringNoclient certificate authentication comma-separated exclusion paths
hostNamesDisabledbooleanNotrue to disable the public hostnames of the app; otherwise, false. If true, the app is only accessible via API management process.
customDomainVerificationIdstringNoUnique identifier that verifies the custom domains assigned to the app. Customer will add this id to a txt record for verification.
containerSizeintegerNoSize of the function container.
dailyMemoryTimeQuotaintegerNoMaximum allowed daily memory-time quota (applicable on dynamic apps only).
cloningInfoobjectNoIf specified during app creation, the app is cloned from a source app. - CloningInfo object
httpsOnlybooleanNoHttpsOnly: configures a web site to accept only https requests. Issues redirect forhttp requests
redundancyModeenumNoSite redundancy mode. - None, Manual, Failover, ActiveActive, GeoRedundant

ManagedServiceIdentity object

NameTypeRequiredValue
typeenumNoType of managed service identity. - SystemAssigned, UserAssigned, SystemAssigned, UserAssigned, None
userAssignedIdentitiesobjectNoThe list of user assigned identities associated with the resource. The user identity dictionary key references will be ARM resource ids in the form: '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.ManagedIdentity/userAssignedIdentities/{identityName}

HostNameSslState object

NameTypeRequiredValue
namestringNoHostname.
sslStateenumNoSSL type. - Disabled, SniEnabled, IpBasedEnabled
virtualIPstringNoVirtual IP address assigned to the hostname if IP based SSL is enabled.
thumbprintstringNoSSL certificate thumbprint.
toUpdatebooleanNoSet to true to update existing hostname.
hostTypeenumNoIndicates whether the hostname is a standard or repository hostname. - Standard or Repository

SiteConfig object

NameTypeRequiredValue
numberOfWorkersintegerNoNumber of workers.
defaultDocumentsarrayNoDefault documents. - string
netFrameworkVersionstringNo.NET Framework version.
phpVersionstringNoVersion of PHP.
pythonVersionstringNoVersion of Python.
nodeVersionstringNoVersion of Node.js.
powerShellVersionstringNoVersion of PowerShell.
linuxFxVersionstringNoLinux App Framework and version
windowsFxVersionstringNoXenon App Framework and version
requestTracingEnabledbooleanNotrue if request tracing is enabled; otherwise, false.
requestTracingExpirationTimestringNoRequest tracing expiration time.
remoteDebuggingEnabledbooleanNotrue if remote debugging is enabled; otherwise, false.
remoteDebuggingVersionstringNoRemote debugging version.
httpLoggingEnabledbooleanNotrue if HTTP logging is enabled; otherwise, false.
logsDirectorySizeLimitintegerNoHTTP logs directory size limit.
detailedErrorLoggingEnabledbooleanNotrue if detailed error logging is enabled; otherwise, false.
publishingUsernamestringNoPublishing user name.
appSettingsarrayNoApplication settings. - NameValuePair object
connectionStringsarrayNoConnection strings. - ConnStringInfo object
handlerMappingsarrayNoHandler mappings. - HandlerMapping object
documentRootstringNoDocument root.
scmTypeenumNoSCM type. - None, Dropbox, Tfs, LocalGit, GitHub, CodePlexGit, CodePlexHg, BitbucketGit, BitbucketHg, ExternalGit, ExternalHg, OneDrive, VSO, VSTSRM
use32BitWorkerProcessbooleanNotrue to use 32-bit worker process; otherwise, false.
webSocketsEnabledbooleanNotrue if WebSocket is enabled; otherwise, false.
alwaysOnbooleanNotrue if Always On is enabled; otherwise, false.
javaVersionstringNoJava version.
javaContainerstringNoJava container.
javaContainerVersionstringNoJava container version.
appCommandLinestringNoApp command line to launch.
managedPipelineModeenumNoManaged pipeline mode. - Integrated or Classic
virtualApplicationsarrayNoVirtual applications. - VirtualApplication object
loadBalancingenumNoSite load balancing. - WeightedRoundRobin, LeastRequests, LeastResponseTime, WeightedTotalTraffic, RequestHash
experimentsobjectNoThis is work around for polymorphic types. - Experiments object
limitsobjectNoSite limits. - SiteLimits object
autoHealEnabledbooleanNotrue if Auto Heal is enabled; otherwise, false.
autoHealRulesobjectNoAuto Heal rules. - AutoHealRules object
tracingOptionsstringNoTracing options.
vnetNamestringNoVirtual Network name.
vnetRouteAllEnabledbooleanNoVirtual Network Route All enabled. This causes all outbound traffic to have Virtual Network Security Groups and User Defined Routes applied.
vnetPrivatePortsCountintegerNoThe number of private ports assigned to this app. These will be assigned dynamically on runtime.
corsobjectNoCross-Origin Resource Sharing (CORS) settings. - CorsSettings object
pushobjectNoPush endpoint settings. - PushSettings object
apiDefinitionobjectNoInformation about the formal API definition for the app. - ApiDefinitionInfo object
apiManagementConfigobjectNoAzure API management settings linked to the app. - ApiManagementConfig object
autoSwapSlotNamestringNoAuto-swap slot name.
localMySqlEnabledbooleanNotrue to enable local MySQL; otherwise, false.
managedServiceIdentityIdintegerNoManaged Service Identity Id
xManagedServiceIdentityIdintegerNoExplicit Managed Service Identity Id
ipSecurityRestrictionsarrayNoIP security restrictions for main. - IpSecurityRestriction object
scmIpSecurityRestrictionsarrayNoIP security restrictions for scm. - IpSecurityRestriction object
scmIpSecurityRestrictionsUseMainbooleanNoIP security restrictions for scm to use main.
http20EnabledbooleanNoHttp20Enabled: configures a web site to allow clients to connect over http2.0
minTlsVersionenumNoMinTlsVersion: configures the minimum version of TLS required for SSL requests. - 1.0, 1.1, 1.2
scmMinTlsVersionenumNoScmMinTlsVersion: configures the minimum version of TLS required for SSL requests for SCM site. - 1.0, 1.1, 1.2
ftpsStateenumNoState of FTP / FTPS service. - AllAllowed, FtpsOnly, Disabled
preWarmedInstanceCountintegerNoNumber of preWarmed instances.This setting only applies to the Consumption and Elastic Plans
healthCheckPathstringNoHealth check path

HostingEnvironmentProfile object

NameTypeRequiredValue
idstringNoResource ID of the App Service Environment.

CloningInfo object

NameTypeRequiredValue
correlationIdstringNoCorrelation ID of cloning operation. This ID ties multiple cloning operationstogether to use the same snapshot. - globally unique identifier
overwritebooleanNotrue to overwrite destination app; otherwise, false.
cloneCustomHostNamesbooleanNotrue to clone custom hostnames from source app; otherwise, false.
cloneSourceControlbooleanNotrue to clone source control from source app; otherwise, false.
sourceWebAppIdstringYesARM resource ID of the source app. App resource ID is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName} for production slots and /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Web/sites/{siteName}/slots/{slotName} for other slots.
sourceWebAppLocationstringNoLocation of source app ex: West US or North Europe
hostingEnvironmentstringNoApp Service Environment.
appSettingsOverridesobjectNoApplication setting overrides for cloned app. If specified, these settings override the settings cloned from source app. Otherwise, application settings from source app are retained.
configureLoadBalancingbooleanNotrue to configure load balancing for source and destination app.
trafficManagerProfileIdstringNoARM resource ID of the Traffic Manager profile to use, if it exists. Traffic Manager resource ID is of the form /subscriptions/{subId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Network/trafficManagerProfiles/{profileName}.
trafficManagerProfileNamestringNoName of Traffic Manager profile to create. This is only needed if Traffic Manager profile does not already exist.

NameValuePair object

NameTypeRequiredValue
namestringNoPair name.
valuestringNoPair value.

ConnStringInfo object

NameTypeRequiredValue
namestringNoName of connection string.
connectionStringstringNoConnection string value.
typeenumNoType of database. - MySql, SQLServer, SQLAzure, Custom, NotificationHub, ServiceBus, EventHub, ApiHub, DocDb, RedisCache, PostgreSQL

HandlerMapping object

NameTypeRequiredValue
extensionstringNoRequests with this extension will be handled using the specified FastCGI application.
scriptProcessorstringNoThe absolute path to the FastCGI application.
argumentsstringNoCommand-line arguments to be passed to the script processor.

VirtualApplication object

NameTypeRequiredValue
virtualPathstringNoVirtual path.
physicalPathstringNoPhysical path.
preloadEnabledbooleanNotrue if preloading is enabled; otherwise, false.
virtualDirectoriesarrayNoVirtual directories for virtual application. - VirtualDirectory object

Experiments object

NameTypeRequiredValue
rampUpRulesarrayNoList of ramp-up rules. - RampUpRule object

SiteLimits object

NameTypeRequiredValue
maxPercentageCpunumberNoMaximum allowed CPU usage percentage.
maxMemoryInMbintegerNoMaximum allowed memory usage in MB.
maxDiskSizeInMbintegerNoMaximum allowed disk size usage in MB.

AutoHealRules object

NameTypeRequiredValue
triggersobjectNoConditions that describe when to execute the auto-heal actions. - AutoHealTriggers object
actionsobjectNoActions to be executed when a rule is triggered. - AutoHealActions object

CorsSettings object

NameTypeRequiredValue
allowedOriginsarrayNoGets or sets the list of origins that should be allowed to make cross-origincalls (for example: http://example.com:12345). Use '*' to allow all. - string
supportCredentialsbooleanNoGets or sets whether CORS requests with credentials are allowed. See https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#Requests_with_credentialsfor more details.

PushSettings object

NameTypeRequiredValue
kindstringNoKind of resource.
systemDataobjectNoThe system metadata relating to this resource. - SystemData object
propertiesobjectNoPushSettings resource specific properties - PushSettingsProperties object

ApiDefinitionInfo object

NameTypeRequiredValue
urlstringNoThe URL of the API definition.

ApiManagementConfig object

NameTypeRequiredValue
idstringNoAPIM-Api Identifier.

IpSecurityRestriction object

NameTypeRequiredValue
ipAddressstringNoIP address the security restriction is valid for.It can be in form of pure ipv4 address (required SubnetMask property) orCIDR notation such as ipv4/mask (leading bit match). For CIDR,SubnetMask property must not be specified.
subnetMaskstringNoSubnet mask for the range of IP addresses the restriction is valid for.
vnetSubnetResourceIdstringNoVirtual network resource id
actionstringNoAllow or Deny access for this IP range.
priorityintegerNoPriority of IP restriction rule.
namestringNoIP restriction rule name.
descriptionstringNoIP restriction rule description.
headersobjectNoIP restriction rule headers.X-Forwarded-Host (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-Host#Examples). The matching logic is ..- If the property is null or empty (default), all hosts(or lack of) are allowed.- A value is compared using ordinal-ignore-case (excluding port number).- Subdomain wildcards are permitted but don't match the root domain. For example, *.contoso.com matches the subdomain foo.contoso.com but not the root domain contoso.com or multi-level foo.bar.contoso.com- Unicode host names are allowed but are converted to Punycode for matching.X-Forwarded-For (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/X-Forwarded-For#Examples).The matching logic is ..- If the property is null or empty (default), any forwarded-for chains (or lack of) are allowed.- If any address (excluding port number) in the chain (comma separated) matches the CIDR defined by the property.X-Azure-FDID and X-FD-HealthProbe.The matching logic is exact match.

VirtualDirectory object

NameTypeRequiredValue
virtualPathstringNoPath to virtual application.
physicalPathstringNoPhysical path.

RampUpRule object

NameTypeRequiredValue
actionHostNamestringNoHostname of a slot to which the traffic will be redirected if decided to. E.g. myapp-stage.azurewebsites.net.
reroutePercentagenumberNoPercentage of the traffic which will be redirected to ActionHostName.
changeStepnumberNoIn auto ramp up scenario this is the step to add/remove from ReroutePercentage until it reaches nMinReroutePercentage or MaxReroutePercentage. Site metrics are checked every N minutes specified in ChangeIntervalInMinutes.nCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified in ChangeDecisionCallbackUrl.
changeIntervalInMinutesintegerNoSpecifies interval in minutes to reevaluate ReroutePercentage.
minReroutePercentagenumberNoSpecifies lower boundary above which ReroutePercentage will stay.
maxReroutePercentagenumberNoSpecifies upper boundary below which ReroutePercentage will stay.
changeDecisionCallbackUrlstringNoCustom decision algorithm can be provided in TiPCallback site extension which URL can be specified. See TiPCallback site extension for the scaffold and contracts.https://www.siteextensions.net/packages/TiPCallback/
namestringNoName of the routing rule. The recommended name would be to point to the slot which will receive the traffic in the experiment.

AutoHealTriggers object

Web Slot
NameTypeRequiredValue
requestsobjectNoA rule based on total requests. - RequestsBasedTrigger object
privateBytesInKBintegerNoA rule based on private bytes.
statusCodesarrayNoA rule based on status codes. - StatusCodesBasedTrigger object
slowRequestsobjectNoA rule based on request execution time. - SlowRequestsBasedTrigger object

AutoHealActions object

NameTypeRequiredValue
actionTypeenumNoPredefined action to be taken. - Recycle, LogEvent, CustomAction
customActionobjectNoCustom action to be taken. - AutoHealCustomAction object
minProcessExecutionTimestringNoMinimum time the process must executebefore taking the action

PushSettingsProperties object

NameTypeRequiredValue
isPushEnabledbooleanYesGets or sets a flag indicating whether the Push endpoint is enabled.
tagWhitelistJsonstringNoGets or sets a JSON string containing a list of tags that are whitelisted for use by the push registration endpoint.
tagsRequiringAuthstringNoGets or sets a JSON string containing a list of tags that require user authentication to be used in the push registration endpoint.Tags can consist of alphanumeric characters and the following:'_', '@', '#', '.', ':', '-'. Validation should be performed at the PushRequestHandler.
dynamicTagsJsonstringNoGets or sets a JSON string containing a list of dynamic tags that will be evaluated from user claims in the push registration endpoint.

RequestsBasedTrigger object

NameTypeRequiredValue
countintegerNoRequest Count.
timeIntervalstringNoTime interval.

StatusCodesBasedTrigger object

NameTypeRequiredValue
statusintegerNoHTTP status code.
subStatusintegerNoRequest Sub Status.
win32StatusintegerNoWin32 error code.
countintegerNoRequest Count.
timeIntervalstringNoTime interval.

SlowRequestsBasedTrigger object

NameTypeRequiredValue
timeTakenstringNoTime taken.
countintegerNoRequest Count.
timeIntervalstringNoTime interval.

AutoHealCustomAction object

NameTypeRequiredValue
exestringNoExecutable to be run.
parametersstringNoParameters for the executable.

Quickstart templates

The following quickstart templates deploy this resource type.

TemplateDescription
Web App with custom Deployment slots
This template provides an easy way to deploy a web app with custom deployment slots on Azure Web Apps.
-->

When you deploy your web app, web app on Linux, mobile back end, or API app to Azure App Service, you can use a separate deployment slot instead of the default production slot when you're running in the Standard, Premium, or Isolated App Service plan tier. Deployment slots are live apps with their own host names. App content and configurations elements can be swapped between two deployment slots, including the production slot.

Deploying your application to a non-production slot has the following benefits:

Web Slot
  • You can validate app changes in a staging deployment slot before swapping it with the production slot.
  • Deploying an app to a slot first and swapping it into production makes sure that all instances of the slot are warmed up before being swapped into production. This eliminates downtime when you deploy your app. The traffic redirection is seamless, and no requests are dropped because of swap operations. You can automate this entire workflow by configuring auto swap when pre-swap validation isn't needed.
  • After a swap, the slot with previously staged app now has the previous production app. If the changes swapped into the production slot aren't as you expect, you can perform the same swap immediately to get your 'last known good site' back.

Each App Service plan tier supports a different number of deployment slots. There's no additional charge for using deployment slots. To find out the number of slots your app's tier supports, see App Service limits.

To scale your app to a different tier, make sure that the target tier supports the number of slots your app already uses. For example, if your app has more than five slots, you can't scale it down to the Standard tier, because the Standard tier supports only five deployment slots.

Add a slot

The app must be running in the Standard, Premium, or Isolated tier in order for you to enable multiple deployment slots.

  1. in the Azure portal, search for and select App Services and select your app.

  2. In the left pane, select Deployment slots > Add Slot.

    Note

    If the app isn't already in the Standard, Premium, or Isolated tier, you receive a message that indicates the supported tiers for enabling staged publishing. At this point, you have the option to select Upgrade and go to the Scale tab of your app before continuing.

  3. In the Add a slot dialog box, give the slot a name, and select whether to clone an app configuration from another deployment slot. Select Add to continue.

    You can clone a configuration from any existing slot. Settings that can be cloned include app settings, connection strings, language framework versions, web sockets, HTTP version, and platform bitness.

  4. After the slot is added, select Close to close the dialog box. The new slot is now shown on the Deployment slots page. By default, Traffic % is set to 0 for the new slot, with all customer traffic routed to the production slot.

  5. Select the new deployment slot to open that slot's resource page.

    The staging slot has a management page just like any other App Service app. You can change the slot's configuration. To remind you that you're viewing the deployment slot, the app name is shown as <app-name>/<slot-name>, and the app type is App Service (Slot). You can also see the slot as a separate app in your resource group, with the same designations.

  6. Select the app URL on the slot's resource page. The deployment slot has its own host name and is also a live app. To limit public access to the deployment slot, see Azure App Service IP restrictions.

The new deployment slot has no content, even if you clone the settings from a different slot. For example, you can publish to this slot with Git. You can deploy to the slot from a different repository branch or a different repository.

What happens during a swap

Swap operation steps

When you swap two slots (usually from a staging slot into the production slot), App Service does the following to ensure that the target slot doesn't experience downtime:

  1. Apply the following settings from the target slot (for example, the production slot) to all instances of the source slot:

    • Slot-specific app settings and connection strings, if applicable.
    • Continuous deployment settings, if enabled.
    • App Service authentication settings, if enabled.

    Any of these cases trigger all instances in the source slot to restart. During swap with preview, this marks the end of the first phase. The swap operation is paused, and you can validate that the source slot works correctly with the target slot's settings.

  2. Wait for every instance in the source slot to complete its restart. If any instance fails to restart, the swap operation reverts all changes to the source slot and stops the operation.

  3. If local cache is enabled, trigger local cache initialization by making an HTTP request to the application root ('/') on each instance of the source slot. Wait until each instance returns any HTTP response. Local cache initialization causes another restart on each instance.

  4. If auto swap is enabled with custom warm-up, trigger Application Initiation by making an HTTP request to the application root ('/') on each instance of the source slot.

    If applicationInitialization isn't specified, trigger an HTTP request to the application root of the source slot on each instance.

    If an instance returns any HTTP response, it's considered to be warmed up.

  5. If all instances on the source slot are warmed up successfully, swap the two slots by switching the routing rules for the two slots. After this step, the target slot (for example, the production slot) has the app that's previously warmed up in the source slot.

  6. Now that the source slot has the pre-swap app previously in the target slot, perform the same operation by applying all settings and restarting the instances.

At any point of the swap operation, all work of initializing the swapped apps happens on the source slot. The target slot remains online while the source slot is being prepared and warmed up, regardless of where the swap succeeds or fails. To swap a staging slot with the production slot, make sure that the production slot is always the target slot. This way, the swap operation doesn't affect your production app.

Which settings are swapped?

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.

Settings that are swapped:

  • General settings, such as framework version, 32/64-bit, web sockets
  • App settings (can be configured to stick to a slot)
  • Connection strings (can be configured to stick to a slot)
  • Handler mappings
  • Public certificates
  • WebJobs content
  • Hybrid connections *
  • Service endpoints *
  • Azure Content Delivery Network *

Features marked with an asterisk (*) are planned to be unswapped.

Settings that aren't swapped:

  • Publishing endpoints
  • Custom domain names
  • Non-public certificates and TLS/SSL settings
  • Scale settings
  • WebJobs schedulers
  • IP restrictions
  • Always On
  • Diagnostic settings
  • Cross-origin resource sharing (CORS)
  • Virtual network integration

Note

To make these settings swappable, add the app setting WEBSITE_OVERRIDE_PRESERVE_DEFAULT_STICKY_SLOT_SETTINGS in every slot of the app and set its value to 0 or false. These settings are either all swappable or not at all. You can’t make just some settings swappable and not the others.

Certain app settings that apply to unswapped settings are also not swapped. For example, since diagnostic settings are not swapped, related app settings like WEBSITE_HTTPLOGGING_RETENTION_DAYS and DIAGNOSTICS_AZUREBLOBRETENTIONDAYS are also not swapped, even if they don't show up as slot settings.

To configure an app setting or connection string to stick to a specific slot (not swapped), go to the Configuration page for that slot. Add or edit a setting, and then select deployment slot setting. Selecting this check box tells App Service that the setting is not swappable.

Swap two slots

You can swap deployment slots on your app's Deployment slots page and the Overview page. For technical details on the slot swap, see What happens during swap.

Important

Before you swap an app from a deployment slot into production, make sure that production is your target slot and that all settings in the source slot are configured exactly as you want to have them in production.

To swap deployment slots:

  1. Go to your app's Deployment slots page and select Swap.

    The Swap dialog box shows settings in the selected source and target slots that will be changed.

  2. Select the desired Source and Target slots. Usually, the target is the production slot. Also, select the Source Changes and Target Changes tabs and verify that the configuration changes are expected. When you're finished, you can swap the slots immediately by selecting Swap.

    To see how your target slot would run with the new settings before the swap actually happens, don't select Swap, but follow the instructions in Swap with preview.

  3. When you're finished, close the dialog box by selecting Close.

If you have any problems, see Troubleshoot swaps.

Swap with preview (multi-phase swap)

Before you swap into production as the target slot, validate that the app runs with the swapped settings. The source slot is also warmed up before the swap completion, which is desirable for mission-critical applications.

When you perform a swap with preview, App Service performs the same swap operation but pauses after the first step. You can then verify the result on the staging slot before completing the swap.

If you cancel the swap, App Service reapplies configuration elements to the source slot.

To swap with preview:

  1. Follow the steps in Swap deployment slots but select Perform swap with preview.

    The dialog box shows you how the configuration in the source slot changes in phase 1, and how the source and target slot change in phase 2.

  2. When you're ready to start the swap, select Start Swap.

    When phase 1 finishes, you're notified in the dialog box. Preview the swap in the source slot by going to https://<app_name>-<source-slot-name>.azurewebsites.net.

  3. When you're ready to complete the pending swap, select Complete Swap in Swap action and select Complete Swap.

    To cancel a pending swap, select Cancel Swap instead.

  4. When you're finished, close the dialog box by selecting Close.

If you have any problems, see Troubleshoot swaps.

To automate a multi-phase swap, see Automate with PowerShell.

Roll back a swap

If any errors occur in the target slot (for example, the production slot) after a slot swap, restore the slots to their pre-swap states by swapping the same two slots immediately.

Configure auto swap

Note

Auto swap isn't supported in web apps on Linux.

Auto swap streamlines Azure DevOps scenarios where you want to deploy your app continuously with zero cold starts and zero downtime for customers of the app. When auto swap is enabled from a slot into production, every time you push your code changes to that slot, App Service automatically swaps the app into production after it's warmed up in the source slot.

Note

Before you configure auto swap for the production slot, consider testing auto swap on a non-production target slot.

To configure auto swap:

  1. Go to your app's resource page. Select Deployment slots > <desired source slot> > Configuration > General settings.

  2. For Auto swap enabled, select On. Then select the desired target slot for Auto swap deployment slot, and select Save on the command bar.

  3. Execute a code push to the source slot. Auto swap happens after a short time, and the update is reflected at your target slot's URL.

If you have any problems, see Troubleshoot swaps.

Specify custom warm-up

Some apps might require custom warm-up actions before the swap. The applicationInitialization configuration element in web.config lets you specify custom initialization actions. The swap operation waits for this custom warm-up to finish before swapping with the target slot. Here's a sample web.config fragment.

For more information on customizing the applicationInitialization element, see Most common deployment slot swap failures and how to fix them.

You can also customize the warm-up behavior with one or both of the following app settings:

  • WEBSITE_SWAP_WARMUP_PING_PATH: The path to ping to warm up your site. Add this app setting by specifying a custom path that begins with a slash as the value. An example is /statuscheck. The default value is /.
  • WEBSITE_SWAP_WARMUP_PING_STATUSES: Valid HTTP response codes for the warm-up operation. Add this app setting with a comma-separated list of HTTP codes. An example is 200,202 . If the returned status code isn't in the list, the warmup and swap operations are stopped. By default, all response codes are valid.

Note

The <applicationInitialization> configuration element is part of each app start-up, whereas the two warm-up behavior app settings apply only to slot swaps.

If you have any problems, see Troubleshoot swaps.

Monitor a swap

If the swap operation takes a long time to complete, you can get information on the swap operation in the activity log.

On your app's resource page in the portal, in the left pane, select Activity log.

A swap operation appears in the log query as Swap Web App Slots. You can expand it and select one of the suboperations or errors to see the details.

Route traffic

By default, all client requests to the app's production URL (http://<app_name>.azurewebsites.net) are routed to the production slot. You can route a portion of the traffic to another slot. This feature is useful if you need user feedback for a new update, but you're not ready to release it to production.

Route production traffic automatically

To route production traffic automatically:

  1. Go to your app's resource page and select Deployment slots.

  2. In the Traffic % column of the slot you want to route to, specify a percentage (between 0 and 100) to represent the amount of total traffic you want to route. Select Save.

After the setting is saved, the specified percentage of clients is randomly routed to the non-production slot.

After a client is automatically routed to a specific slot, it's 'pinned' to that slot for the life of that client session. On the client browser, you can see which slot your session is pinned to by looking at the x-ms-routing-name cookie in your HTTP headers. A request that's routed to the 'staging' slot has the cookie x-ms-routing-name=staging. A request that's routed to the production slot has the cookie x-ms-routing-name=self.

Note

Next to the Azure portal, you can also use the az webapp traffic-routing set command in the Azure CLI to set the routing percentages from CI/CD tools like DevOps pipelines or other automation systems.

Route production traffic manually

In addition to automatic traffic routing, App Service can route requests to a specific slot. This is useful when you want your users to be able to opt in to or opt out of your beta app. To route production traffic manually, you use the x-ms-routing-name query parameter.

To let users opt out of your beta app, for example, you can put this link on your webpage:

The string x-ms-routing-name=self specifies the production slot. After the client browser accesses the link, it's redirected to the production slot. Every subsequent request has the x-ms-routing-name=self cookie that pins the session to the production slot.

To let users opt in to your beta app, set the same query parameter to the name of the non-production slot. Here's an example:

By default, new slots are given a routing rule of 0%, shown in grey. When you explicitly set this value to 0% (shown in black text), your users can access the staging slot manually by using the x-ms-routing-name query parameter. But they won't be routed to the slot automatically because the routing percentage is set to 0. This is an advanced scenario where you can 'hide' your staging slot from the public while allowing internal teams to test changes on the slot.

Delete a slot

Search for and select your app. Select Deployment slots > <slot to delete> > Overview. The app type is shown as App Service (Slot) to remind you that you're viewing a deployment slot. Select Delete on the command bar.

Automate with PowerShell

Note

This article has been updated to use the Azure Az PowerShell module. The Az PowerShell module isthe recommended PowerShell module for interacting with Azure. To get started with the AzPowerShell module, see Install Azure PowerShell. To learn howto migrate to the Az PowerShell module, seeMigrate Azure PowerShell from AzureRM to Az.

Azure PowerShell is a module that provides cmdlets to manage Azure through Windows PowerShell, including support for managing deployment slots in Azure App Service.

For information on installing and configuring Azure PowerShell, and on authenticating Azure PowerShell with your Azure subscription, see How to install and configure Microsoft Azure PowerShell.

Create a web app

Create a slot

Initiate a swap with a preview (multi-phase swap), and apply destination slot configuration to the source slot

Cancel a pending swap (swap with review) and restore the source slot configuration

Swap deployment slots

Monitor swap events in the activity log

Play Slots Online For Money

Delete a slot

Automate with Resource Manager templates

Azure Resource Manager templates are declarative JSON files used to automate the deployment and configuration of Azure resources. To swap slots by using Resource Manager templates, you will set two properties on the Microsoft.Web/sites/slots and Microsoft.Web/sites resources:

  • buildVersion: this is a string property which represents the current version of the app deployed in the slot. For example: 'v1', '1.0.0.1', or '2019-09-20T11:53:25.2887393-07:00'.
  • targetBuildVersion: this is a string property that specifies what buildVersion the slot should have. If the targetBuildVersion does not equal the current buildVersion, then this will trigger the swap operation by finding the slot which has the specified buildVersion.

Example Resource Manager template

The following Resource Manager template will update the buildVersion of the staging slot and set the targetBuildVersion on the production slot. This will swap the two slots. The template assumes you already have a webapp created with a slot named 'staging'.

This Resource Manager template is idempotent, meaning that it can be executed repeatedly and produce the same state of the slots. After the first execution, targetBuildVersion will match the current buildVersion, so a swap will not be triggered.

Web Slot Machine

Automate with the CLI

Web Solutions Of America

For Azure CLI commands for deployment slots, see az webapp deployment slot.

Troubleshoot swaps

If any error occurs during a slot swap, it's logged in D:homeLogFileseventlog.xml. It's also logged in the application-specific error log.

Here are some common swap errors:

  • An HTTP request to the application root is timed. The swap operation waits for 90 seconds for each HTTP request, and retries up to 5 times. If all retries are timed out, the swap operation is stopped.

  • Local cache initialization might fail when the app content exceeds the local disk quota specified for the local cache. For more information, see Local cache overview.

  • During custom warm-up, the HTTP requests are made internally (without going through the external URL). They can fail with certain URL rewrite rules in Web.config. For example, rules for redirecting domain names or enforcing HTTPS can prevent warm-up requests from reaching the app code. To work around this issue, modify your rewrite rules by adding the following two conditions:

  • Without a custom warm-up, the URL rewrite rules can still block HTTP requests. To work around this issue, modify your rewrite rules by adding the following condition:

  • After slot swaps, the app may experience unexpected restarts. This is because after a swap, the hostname binding configuration goes out of sync, which by itself doesn't cause restarts. However, certain underlying storage events (such as storage volume failovers) may detect these discrepancies and force all worker processes to restart. To minimize these types of restarts, set the WEBSITE_ADD_SITENAME_BINDINGS_IN_APPHOST_CONFIG=1 app setting on all slots. However, this app setting does not work with Windows Communication Foundation (WCF) apps.

Web Slot Terbaik

Next steps