Skip to content

[BUG] Creating a Slot Incorrectly Truncates AppService Name when Creating Hostname #53577

@Exile322

Description

@Exile322

Library name and version

Azure.ResourceManager.AppService 1.4.0

Describe the bug

When programmatically creating a Deployment Slot for an AppService in C#, the Hostname of the slot always reserves 19 characters even if the actual slot name isn't that long. When using Unique Hostnames this means there's only 23 characters available for the appservice name part which is automatically truncated when creating the slot. When using the same names to create the slot in the portal it does not reserve 19 characters or truncate the appservice name.

Expected behavior

AppService Name: testing-abcdefghijklmnopqrstuvwxyz1
Slot Name: staging
Unique Hostnames Enabled

Expected Hostname: testing-abcdefghijklmnopqrstuvwxyz1-staging-<16 char hash>

Actual behavior

Actual Hostname created: testing-abcdefghijklmno-staging-<16 char hash>

Reproduction Steps

  1. Create AppService called testing-abcdefghijklmnopqrstuvwxyz1 with unique hostnames enabled (I had subscription level reuse)
  2. Create Slot called staging
  3. View the hostname of the slot in the portal and observe the truncated appservice name part and a length of 48 characters instead of the 60 character limit

Environment

No response

Metadata

Metadata

Assignees

Labels

App ServicesMgmtThis issue is related to a management package.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK teamquestionThe issue doesn't require a change to the product in order to be resolved. Most issues start as that

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions