【发布时间】:2022-08-20 02:24:15
【问题描述】:
将 ASP.NET Core 3.1 应用程序部署到 IIS 时出现问题。
当我在 appsettings.json 文件中提供 Windows 凭据时,我总是收到此错误:
使用 DOMAIN\\USERNAME$ 登录失败
我应该在我的
web.config中更新连接字符串还是在 IIS 管理器中更新我的 IIS 服务器?
appsettings.json:{ \"AppSettings\": { \"Secret\": \"9HGXuFLr5PeSjhBBgvMM8CYCQkCcfFgWgQFQvX9M6ahsHC87ESH3cVajpnfTHEBJ\" }, \"Logging\": { \"LogLevel\": { \"Default\": \"Debug\", \"System\": \"Information\", \"Microsoft\": \"Information\" } }, \"AllowedHosts\": \"*\", \"ConnectionStrings\": { \"L4LAuthentification_TEST01DataBase\": \"Server=SRVSQL-01-TST\\\\INSTANCE1;Database=L4LAuthentification_TEST01;Integrated Security=True;\", \"L4Authentification_RECET01DataBase\": \"Server=SRVSQL-01-TST\\\\INSTANCE1;Database=L4Authentification_RECET01;Integrated Security=True;\", \"DevInfoCDataBase\": \"Server=SRVSQL-01-TST\\\\INSTANCE1;Database=DevInfoC;Integrated Security=True;\", \"InfocentreRecet01DataBase\": \"Server=SRVSQL-01-TST\\\\INSTANCE1;Database=InfocentreRecet01;Integrated Security=True;\", \"L4LGestionFLux_TEST01DataBase\": \"Server=SRVSQL-01-TST\\\\INSTANCE1;Database=L4LGestionFLux_TEST01;Integrated Security=True;\", \"L4GestionFlux_RECET01DataBase\": \"Server=SRVSQL-01-TST\\\\INSTANCE1;Database=L4GestionFlux_RECET01;Integrated Security=True;\", \"L4EdiFluxInDataBase\": \"Server=SRVSQL-01-TST\\\\INSTANCE1;Database=L4EdiFluxIn;Integrated Security=True;\", } }
-
我已将我的 cmets 更新为答案,因为它似乎确实让您走上了正确的道路。
标签: sql-server asp.net-core iis windows-authentication