Working with DirectoryServices in ASP.NET Core

前端 未结 5 1756
说谎
说谎 2021-02-02 14:22

I am upgrading my ASP.NET Core RC1 application to RC2. I have some references to System.DirectoryServices and System.DirectoryServices.AccountManagement

5条回答
  •  花落未央
    2021-02-02 14:48

    The new CoreCLR doesn't support this library, at the moment. There's an open GitHub issue about this, where you can find more information and discussion. (A workaround is presented there if you are only using AD for your authentication system.)

    If you're only planning on running this app on a Windows server, you could target "net452" for the framework and add the framework assemblies underneath that.

    "frameworks": {
      "net452": {
        "frameworkAssemblies": {
          "System.DirectoryServices": "4.0.0.0",
          "System.DirectoryServices.AccountManagement": "4.0.0.0"
        }
      }
    },
    

提交回复
热议问题