I am building a .net 5 core asp.net app and developing on a windows maching. I am deploying to a Windows 2019 server with IIS. I installed the hosting bundle and the runtime. I can run the app fine until I add in ldap authentication. I normally use System.DirectoryServices. It runs fine locally, but on the server I get the exception:
System.PlatformNotSupportedException: System.DirectoryServices is not supported on this platform.
I got warnings while developing that DirectorySearcher and DirectoryEntry were only available on windows. I thought no problem I am devving and deploying on windows. So why would I be getting this error. Am I missing a configuation somewhere?