Blazor身份验证不能在实时环境中工作,而可以在开发环境中工作

时间:2020-02-11 12:26:36

标签: authentication asp.net-core blazor-server-side asp.net-core-authenticationhandler

使用在实时发布的本地计算机中运行良好的asp.net核心默认身份验证,以及将azure置于无效状态时,会发生错误。

asp.net核心:已使用3.0

错误截图 **enter image description here**

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"
    }
  }
}

0 个答案:

没有答案