使用在实时发布的本地计算机中运行良好的asp.net核心默认身份验证,以及将azure置于无效状态时,会发生错误。
asp.net核心:已使用3.0
appsetting.json
{
"ConnectionStrings": {
"DefaultConnection": "SERVER=servername;INITIAL CATALOG=catlogname;PERSIST SECURITY INFO=FALSE;USER ID=dbname;PASSWORD=****;MULTIPLEACTIVERESULTSETS=FALSE;ENCRYPT=TRUE;TRUSTSERVERCERTIFICATE=FALSE;CONNECTION TIMEOUT=30;"
},
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft": "Warning",
"Microsoft.Hosting.Lifetime": "Information"
}
},
"AllowedHosts": "*"
}
launchsettings.json
{
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:62632",
"sslPort": 44336
}
},
"profiles": {
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"LabOrg": {
"commandName": "IISExpress",
"launchBrowser": true,
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Production"
},
"applicationUrl": "https://localhost:5001;http://localhost:5000"
}
}
}