Kentico 未读取更新的 SQL 服务器服务器名称、用户名或密码

Kentico not reading updated SQL Server servername, username or password

Kentico CMS 作为 Azure 应用服务托管。必须更改我们的 Azure SQL 服务器的管理员密码。更新 Kentico root web.config 的连接字符串中的密码后,Kentico 仍然抱怨此错误消息

SQL Connection Error The application could not connect to the database, please check the connection string in the web.config file and SQL server availability.

Original error: Login failed for user 'myadminusername'

请注意,我无法清除 Kentico 缓存,因为我根本无法访问门户。并且没有 IIS,因为这是一个 Azure 应用程序服务。我试过多次重启应用程序服务,但没有成功。

在 web.config 中奇怪地更改用户名或服务器地址在错误消息中没有任何变化。错误消息中显示相同的旧用户名。

我在 SSMS 或其他应用程序中使用连接字符串值没有问题。两者都使用新密码。

有 2 个地方可以更改此用户名和密码:

  • web.config
  • A​​zure 应用程序设置

默认情况下,应用程序设置会覆盖 web.config 设置。因此,您可以整天在 web.config 中更改密码,只要您的 Azure 应用程序设置保持不变,您的网站就永远不会看到这些更新。我建议在应用程序 settings/configuration 下检查 Azure 门户,看看设置中是否有 CMSConnectionString。如果是这样,请在那里更新凭据。