Hello,
Has anyone succesfully implemented the UserAndGroupType Api (Dynamicweb.Security.UserManagement.UserTypes)?
There are no examples in the documentation, and whichever api call I try to use it always leads to a null reference exception:
[NullReferenceException: Object reference not set to an instance of an object.]
Dynamicweb.Core.SystemInformation.GetBasePath(String& relativePath) +271
Dynamicweb.Core.SystemInformation.MapPath(String relativePath) +61
Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeRepository..cctor() +60
The service is kind of weird also, if you instantiate a new instance it has no methods, and if you call a method on the type directly it leads to the same error:
[NullReferenceException: Object reference not set to an instance of an object.]
Dynamicweb.Core.SystemInformation.GetBasePath(String& relativePath) +271
Dynamicweb.Core.SystemInformation.MapPath(String relativePath) +61
Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeRepository..cctor() +60
[TypeInitializationException: The type initializer for 'Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeRepository' threw an exception.]
Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeRepository..ctor() +24
Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeService..cctor() +48
[TypeInitializationException: The type initializer for 'Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeService' threw an exception.]
[HttpException (0x80004005): The type initializer for 'Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeService' threw an exception.]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +521
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +185
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +418
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +369
[HttpException (0x80004005): The type initializer for 'Dynamicweb.Security.UserManagement.UserTypes.UserAndGroupTypeService' threw an exception.]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +534
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +111
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +718
I have updated the Dynamicweb.Security package from 4.1.1 to the latest 4.3 version, but that made no difference.
Greets Hans