0
votes

I recently deployed an updated version of my application to my production environment and started getting the following error when navigating to the home page of one of the apps:

Windows Principal functionality is not supported on this platform.

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

This error is not happening on my local environment or test environment.

All environments are using version 6.3.187.9494 of Service Fabric

Does anybody know what might cause this?

1
Which OS are you using? Are you running the service as specific user?Diego Mendes
The OS is Windows 2016. I haven't configured a user, it is the user that is created as part of the Azure SF setup. If I roll back to the previous version of the app the problem goes away, but I'm reluctant to roll forward again until I can establish what the problem actually is.Slicc
Probably is an issue with any new version of a package in your application, if you updated any package, try upgrading one by one to identify which one is throwing the error, or maybe a configuration change in the application. What authentication method are you using?Diego Mendes

1 Answers

0
votes

The are multiple "Flavors" to "System.Security.Principal.Windows", make sure you use the right one. (In my case it was due to mixing .NET Standard 2.0 and .NET Framework projects in the same solution, I needed to add an overriding reference from the .NET Framework project)