【问题标题】:Getting System.PlatformNotSupportedException in Azure Service Fabric在 Azure Service Fabric 中获取 System.PlatformNotSupportedException
【发布时间】:2019-03-23 07:46:08
【问题描述】:

我最近将我的应用程序的更新版本部署到我的生产环境,并在导航到其中一个应用程序的主页时开始收到以下错误:

此平台不支持 Windows 主体功能。

System.PlatformNotSupportedException:在 System.Security.Principal.WindowsIdentity.GetAnonymous (System.Security.Principal.Windows,版本=4.1.1.1,文化=中性, PublicKeyToken=b03f5f7f11d50a3a) 在 Microsoft.AspNetCore.HttpSys.Internal.NativeRequestContext.GetUser (Microsoft.AspNetCore.Server.HttpSys,版本=2.1.1.0, 文化=中性,PublicKeyToken=adb9793829ddae60) 在 Microsoft.AspNetCore.Server.HttpSys.Request..ctor (Microsoft.AspNetCore.Server.HttpSys,版本=2.1.1.0, 文化=中性,PublicKeyToken=adb9793829ddae60) 在 Microsoft.AspNetCore.Server.HttpSys.RequestContext..ctor (Microsoft.AspNetCore.Server.HttpSys,版本=2.1.1.0, 文化=中性,PublicKeyToken=adb9793829ddae60) 在 Microsoft.AspNetCore.Server.HttpSys.AsyncAcceptContext.IOCompleted (Microsoft.AspNetCore.Server.HttpSys,版本=2.1.1.0, 文化=中性,PublicKeyToken=adb9793829ddae60) 在 System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib,版本=4.0.0.0,文化=中性, PublicKeyToken=7cec85d7bea7798e) 在 Microsoft.AspNetCore.Server.HttpSys.MessagePump+d__22.MoveNext (Microsoft.AspNetCore.Server.HttpSys,版本=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60)

我的本​​地环境或测试环境没有发生此错误。

所有环境都使用版本 6.3.187.9494 的 Service Fabric

有人知道是什么原因造成的吗?

【问题讨论】:

  • 您使用的是哪个操作系统?您是否以特定用户的身份运行服务?
  • 操作系统是 Windows 2016。我没有配置用户,它是作为 Azure SF 设置的一部分创建的用户。如果我回滚到应用程序的先前版本,问题就会消失,但我不愿意再次前滚,直到我确定问题到底是什么。
  • 可能是您应用程序中任何新版本的包的问题,​​如果您更新了任何包,请尝试逐个升级以确定哪个抛出错误,或者可能是配置更改应用。您使用的是什么身份验证方法?

标签: azure-service-fabric


【解决方案1】:

“System.Security.Principal.Windows”有多种“风味”,请确保使用正确的一种。 (在我的例子中,由于在同一个解决方案中混合了 .NET Standard 2.0 和 .NET Framework 项目,我需要从 .NET Framework 项目中添加一个覆盖引用)

【讨论】:

    猜你喜欢
    • 2019-11-30
    • 1970-01-01
    • 2015-09-17
    • 2017-09-02
    • 2018-11-06
    • 1970-01-01
    • 1970-01-01
    • 2017-11-25
    • 2016-09-28
    相关资源
    最近更新 更多