There are no exceptions but I found the message in VS output window:
MIP: Error: LoginServerSvc.SetCustomSettingData ():Unable to update or save for id=…my plugin guid…
What does it mean?
Is there a way to get a return code or exception in my code to be able to analyze the result of saving options?
And the MAIN question - why it happened? This code worked successfully for a long time but the issue happened today…
UPDATED:
There is some data stored by MyPluginId. I see it using ConfigAPIClient.exe (from MIPSDK samples). But the GetOptionsConfiguration in my code doesn’t return it.
Could you please check the MIP logs in [c:\ProgramData\Milestone\](file:c:/ProgramData/Milestone/)
If you are running in a Smart Client plugin you will need to first enable the logs. For SC 2020 R3 you can do that in the Settings dialog under Advanced tab (says “Logging (for technical support)”. After reproducing the error you can then find the log file here: [c:\ProgramData\Milestone\XProtect](file:c:/ProgramData/Milestone/XProtect) Smart Client\MIPLog.txt
I would expect some exception details to be logged there.
I faced the issue in my own standalone app. As I said in my first message there are no exceptions during SaveOptionsConfiguration. There is only the message in VS Output Window:
MIP: Error: LoginServerSvc.SetCustomSettingData ():Unable to update or save for id=
The exception will be catched and handled, but should also be logged, so if you are running in a standalone application please check [c:\ProgramData\Milestone\MIPSDK\MIP](file:c:/ProgramData/Milestone/MIPSDK/MIP).log
This took quite some investigation, but I might have an idea what could be the problem. Could you please use the config api client to check under MIP Kinds the kind that correspond to your ID and see what is set for “Define content type ITEM or OPTION”?
If it is set to ITEM you can try change it to OPTION and Save and then see if that solves your problem.
What do you think is the reason why the Get/SaveOptionsConfiguration works well in the Administration environment but not works in Standalone and SmartClient environment? But at the same time the Get/SetMipOptionProperties works in any environment…
The implementations are a bit different, but we cannot figure out what is causing the difference you see. We also cannot reproduce unless we change the content type to ITEM, which is why I asked. Just to be sure: You are not storing any items from Management Client using the same GUID as the Kind?