Why is hyphen not allowed in app setting name?

Mago 1 Reputation point
2022-03-11T02:30:59.333+00:00

I need to add an application setting spring.session.store-type for my web app. But it is not allowed to have hyphen in the app setting name. What do i do?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,930 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2022-03-11T20:53:59.137+00:00

    Hello @Mago

    You are right, Azure App Service App Settings does not respect dash in its name.

    That it's because environment variables itself don't support dashes.
    Environment variable names used by the utilities in the Shell and Utilities volume of IEEE Std 1003.1-2001 consist solely of uppercase letters, digits, and the '_' (underscore) from the characters defined in Portable Character Set and do not begin with a digit.
    http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html

    There is well-known issue opened in dotnet runtime
    https://github.com/dotnet/runtime/issues/63312

    1 person found this answer helpful.
    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.