Hi,
I have been using the Picture Edit.
I found that once I finish with the Designer mode of Visual Studio, it would generate some codes like this:
this.pictureEdit1.Properties.ErrorImage = ((System.Drawing.Image)(resources.GetObject("pictureEdit1.Properties.ErrorImage")));
this.pictureEdit1.Properties.InitialImage = ((System.Drawing.Image)(resources.GetObject("pictureEdit1.Properties.InitialImage")));
It was working fine, until one day I set the registry option for FIPS compliant to on,
(i.e. set HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\ fipsalgorithmpolicy value from 0 to 1)
Then that first line will throw an exception, here's the stack trace:
at System.RuntimeMethodHandle._InvokeConstructor(Object[] args, SignatureStruct& signature, IntPtr declaringType)
at System.RuntimeMethodHandle.InvokeConstructor(Object[] args, SignatureStruct signature, RuntimeTypeHandle declaringType)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Security.Cryptography.CryptoConfig.CreateFromName(String name, Object[] args)
at System.Security.Cryptography.MD5.Create(String algName)
at System.Security.Cryptography.MD5.Create()
at DevExpress.XtraEditors.Controls.ImagesComparer.GetHashString(Byte[] arrayToHash)
at DevExpress.XtraEditors.Controls.ImagesComparer.GetImageHash(Image image)
at DevExpress.XtraEditors.Controls.ImagesComparer.AreEqual(Image imageA, Image imageB)
at DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit.set_ErrorImage(Image value)
And so, I have some questions:
- Is it normal that the designer mode would generate code for the .ErrorImage and .InitialImage by default? I didn't set any image to both field.
- Or, is there some setting that I can get the ImagesComparer to not use the MD5?
- Or, how can I properly workaround the exception? Currently I have to manually remove that two generated lines to avoid the exception everytime after I finish with the designer mode.
Thanks in advance.
JC