For my software a encrypted license file contains information regarding rights and a possible expiration date. This information then is written into the registry for reference when the program is started. Only when invalid, e.g. the expiration date is reached, the program re-reads the license file, and if this is still the expired one, it updates via WCF from a MySQL database.
Now both actions failed. Beginning with the WCF action: the login failed with the following error:
"Authentication method 'caching_sha2_password' not supported by any of the available plugins"
This could be related with a required conversion of MySQL databases from version 5 to 8 end last year. On the internet I find that MySql.Data.dll should be at least version 8.0.x. It wasn't on the server but after updating the error persisted. Also I read suggestion that I could choose Use Legacy Authentication method but that seems to be related to a MySQL database on my own Pc (by running MySQL Installer) and in my case, the databases reside on a server from our hosting company.
Does anyone have a suggestion how to handle this?
The other option requires some manual work (uploading an update license file) but I saw something strange there. According to the log entries, the updated information was read from the file and written in the registry. Directly afterwards, the data were read again from the registry....but I see the old values! Hence, my program again tells that the license is expired. So I restarted the program and now it reads the correct, updated values.
Could there be a delay in writing registry data and reading them? If so, what can I do to prevent this?
Dick
Registry and MySQL issues
Re: Registry and MySQL issues
Hey Dick,
It seems forever you have issues writing and reading registry values. If I recall you had issues before and you have not replied to my suggestions regarding the registry!
Anyway, now I suggest using a json or xml file to store instead the licensing keys and you should not have issues with registry access permissions.
Jamal
It seems forever you have issues writing and reading registry values. If I recall you had issues before and you have not replied to my suggestions regarding the registry!
Anyway, now I suggest using a json or xml file to store instead the licensing keys and you should not have issues with registry access permissions.
Jamal
Re: Registry and MySQL issues
Hello Jamal,
I think you are referring to https://www.xsharp.eu/forum/topic?p=329 ... try#p32982
where you wrote:
In the GetString method, try to change to KEY_QUERY_VALUE to KEY_ALL_ACCESS + KEY_WOW64_64KEY
I hadn't changed it by then as I thought that this was not a parameter and the last issue seen was already solved by the client with recreating the Windows user profile. I found GetString turned out to be part of a class I must have picked up somewhere many years ago. I made the change you proposed but as the malfunctioning of registry reading may not be reproducible, the problems pop up now and then, I will follow your and Arne's advice to not use the registry if not necessary.
It seems a logic thought to rely on general Windows concepts to work, but as the maintaining company is called Microsoft then we must already be happy if reading file content works consequently and well on different machines and Windows versions, I guess.
In any case, thanks for your remarks on this post and the previous.
Dick
I think you are referring to https://www.xsharp.eu/forum/topic?p=329 ... try#p32982
where you wrote:
In the GetString method, try to change to KEY_QUERY_VALUE to KEY_ALL_ACCESS + KEY_WOW64_64KEY
I hadn't changed it by then as I thought that this was not a parameter and the last issue seen was already solved by the client with recreating the Windows user profile. I found GetString turned out to be part of a class I must have picked up somewhere many years ago. I made the change you proposed but as the malfunctioning of registry reading may not be reproducible, the problems pop up now and then, I will follow your and Arne's advice to not use the registry if not necessary.
It seems a logic thought to rely on general Windows concepts to work, but as the maintaining company is called Microsoft then we must already be happy if reading file content works consequently and well on different machines and Windows versions, I guess.
In any case, thanks for your remarks on this post and the previous.
Dick

