From c77991cf340566cccb9a48f5104f18582c5df18c Mon Sep 17 00:00:00 2001 From: "Liangying.Wei" Date: Tue, 2 Aug 2022 18:25:30 +0800 Subject: [PATCH] Update ServiceOptionsSetup.cs --- src/Microsoft.Azure.SignalR/ServiceOptionsSetup.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Microsoft.Azure.SignalR/ServiceOptionsSetup.cs b/src/Microsoft.Azure.SignalR/ServiceOptionsSetup.cs index 2619185d0..b261c04a3 100644 --- a/src/Microsoft.Azure.SignalR/ServiceOptionsSetup.cs +++ b/src/Microsoft.Azure.SignalR/ServiceOptionsSetup.cs @@ -37,7 +37,8 @@ public IChangeToken GetChangeToken() private (string AppName, string ConnectionString, ServerStickyMode StickyMode, ServiceEndpoint[] Endpoints) ParseConfiguration() { - var appName = _configuration[Constants.Keys.ApplicationNameDefaultKeyPrefix]; + // For backward compatability, first read from prefix + var appName = _configuration[Constants.Keys.ApplicationNameDefaultKeyPrefix] ?? _configuration[Constants.Keys.ApplicationNameDefaultKey]; var stickyMode = ServerStickyMode.Disabled; var mode = _configuration[Constants.Keys.ServerStickyModeDefaultKey]; if (!string.IsNullOrEmpty(mode)) @@ -58,4 +59,4 @@ public IChangeToken GetChangeToken() return (appName, connectionString, stickyMode, endpoints); } } -} \ No newline at end of file +}