My ASP.NET Core application uses VB.net library that needs to know privileges of the current user. It used My.User.IsInRole(ApplicationServices.BuiltInRole.Administrator)
call before, but in asp.net core it comes up with the following exception:
System.TypeLoadException: 'Could not load type 'Microsoft.VisualBasic.ApplicationServices.User' from assembly 'Microsoft.VisualBasic, Version=10.0.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'.'
I also tried to use System.Web.Security.Roles.IsUserInRole("Administrators")
But this one will not load system.web
Is there an alternative way to do it?