-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
TypeInitializationException and InvalidCastException thrown when calling LithnetRMA from an execution controller #141
Comments
@johnyukloud this is definitely a bug, but a complex one to solve. I'll look to resolve this in v2. In the mean time, the workaround would be to launch a new instance of PowerShell to run the fim service query such as shown in this example https://stackoverflow.com/questions/23237473/powershell-launch-script-in-new-instance You seem to be referencing another issue with Get-MVObject. That is from a different PowerShell module. Can you provide more information about the context of the issue you are having there? |
@johnyukloud I'm working on the fix for this, but I've got a cleaner workaround you can use in the mean time. Edit the Lithnet.Miiserver.AutoSync.exe.config file and remove the following two lines <section name="lithnetResourceManagementClient" type="Lithnet.ResourceManagement.Client.ClientConfigurationSection, Lithnet.ResourceManagement.Client"/> and <lithnetResourceManagementClient resourceManagementServiceBaseAddress="http://localhost:5725"/> This will prevent the error you are seeing. These lines are not needed for AutoSync or the PowerShell module to work. |
…zing the ResourceManagementClient when two different versions of the assembly had been loaded into the same AppDomain lithnet/miis-autosync#141
…zing the ResourceManagementClient when two different versions of the assembly had been loaded into the same AppDomain lithnet/miis-autosync#141
Updates RMC library to fix issue #141
@johnyukloud i'm marking this issue as done. You can apply the workaround above, or install the latest version of LithnetRMA from https://github.com/lithnet/resourcemanagement-powershell/releases/tag/v1.0.6623 If you are still having issues with Get-MVObject, please open a new issue, and we work on that one separately, as it is unrelated to what is going on here. |
Great! Thanks Ryan |
When I invoke Lithnet Resource Management PS from MA executor, it would fail on
Set-ResourceManagementClient -BaseAddress "http://localhost:5725";
there is error in the application eventlog about System.TypeInitializationException: The type initializer for 'Lithnet.ResourceManagement.Client.ResourceManagementClient' threw an exception.
Seems it is not able to access the configure file when executed from the MA executor.
The code I executed as follow:
The error in the eventlog as below:
what is the proper way to execute Lithnet Resource Management PS from MA executor from the Executor MA?
I have tried to wrap around the call inside a script block, it works but the Get-MVObject would fail, it would return
when the Synchronization Service Manager service is actually running.
The text was updated successfully, but these errors were encountered: