Abp项目InternalServerError,SimpleStringCipher.Decrypt()找不到

来源:互联网 发布:苹果数据接口转usb 编辑:程序博客网 时间:2024/06/05 04:42

从ABP框架官网(http://www.aspnetboilerplate.com/),自动生成了一个解决方案,按步骤配置好之后,没有报任何错误,但运行打开的网页却显示“InternalServerError”。后来通过Test中提供的单元测试测试代码发现问题:

System.MissingMethodException : 找不到方法:“System.String Abp.Runtime.Security.SimpleStringCipher.Decrypt(System.String, System.String, Byte[])”。


后在官方问题2070中找到答案。

If we encrypted a text before upgrade to v2.0, we can not decryt it with v2.0 even if we use the same encryption key. This happens because SimpleStringCipher is changed to be able to support .netstandard and introduces a Salt argument.

Solution: We will use the old code for .net46 and new code for .netstandard1.6. Thus, upgrading will not cause problems. If you then want to switch to .net core, you need to develop a tool that makes the conversion. We may create such a code to help to the community.

解决:

我们只需要将Abp.Zero升级到与ABP v2.0.2兼容的Abp.Zero v2.0.2即可