新文章 网摘 文章 随笔 日记

06 2020 档案

摘要:Newtonsoft.Json反序列化复杂类型,其中包含接口类型时出错,错误信息:Type is an interface or abstract class and cannot be instantiated。 解决方案:序列化和反序列化时添加JsonSerializerSettings,属性T 阅读全文
posted @ 2020-06-28 11:20 岭南春 阅读(820) 评论(0) 推荐(0)
摘要:using Newtonsoft.Json; using Newtonsoft.Json.Linq; using System.IO; namespace Phoenix.Spider.Helpers { public class JsonHelper { private string _fileF 阅读全文
posted @ 2020-06-27 13:47 岭南春 阅读(180) 评论(0) 推荐(0)
摘要:https://stackoverflow.com/questions/12577496/pre-build-event-copy-folder-and-its-subfolders-and-files-into-build-directory 阅读全文
posted @ 2020-06-26 11:12 岭南春 阅读(141) 评论(0) 推荐(0)
摘要:新建winform项目,命名为WfaAutoFacDemo,使用nuget添加autofac的引用,最新版为4.8.1,直接安装即可 添加一个服务接口:IService和ISecondService,定义如下: namespace WfaAutoFacDemo.Interface{ public i 阅读全文
posted @ 2020-06-18 11:05 岭南春 阅读(984) 评论(0) 推荐(0)
摘要:参照了很多文献最终配置成功 第一部分:CentOS方面 1. 配置/etc/sysconfig/network-scripts/ifcfg-ens33 #(网络设备标示) E=EthernetPROXY_METHOD=noneBROWSER_ONLY=noBOOTPROTO=staticDEFROU 阅读全文
posted @ 2020-06-15 19:16 岭南春 阅读(77) 评论(0) 推荐(0)
摘要:1、系统开机后,在下图界面时按 "e" 键编辑选中项(通常就是第一项,默认已经选中了)。 注意事项: A)此界面默认只停留5秒(类似Windows 系统进入BIOS)。 B)如果是虚拟机操作,则应该先使用鼠标在界面中点击一下,或者按 Ctrl+G 将输入定向到虚拟机,否则按字母 "e" 或者 上下箭 阅读全文
posted @ 2020-06-15 11:37 岭南春 阅读(299) 评论(0) 推荐(0)
摘要:如果启动IdentityServer时遇到的欢迎页面没有任何有效的CSS,JS或图像,需要在web.config中配置: <configuration> ... <system.webServer> <modules runAllManagedModulesForAllRequests="true" 阅读全文
posted @ 2020-06-12 15:12 岭南春 阅读(202) 评论(0) 推荐(0)
摘要:设置IdentityServer3的新实例时,需要为每个项目做一些事情。 在为IdentityServer3设置一个简单的启动套件(其中也包含用于用户的IdentityManager和用于客户端的admin)时,按照我的步骤,这将是一个小型教程/系列。 这是建立新项目时快速开始使用IdentityS 阅读全文
posted @ 2020-06-12 10:56 岭南春 阅读(224) 评论(0) 推荐(0)
摘要:nuget安装:Serilog,Serilog.Sinks.File .net core在Program.cs中(MVC在Global.asax中): using Serilog;using Serilog.Events; //写日志 Log.Logger = new LoggerConfigura 阅读全文
posted @ 2020-06-12 10:23 岭南春 阅读(225) 评论(0) 推荐(0)
摘要:public static X509Certificate2 Get() { //证书公钥 var certificate = Convert.FromBase64String(ConfigurationManager.AppSettings.Get("SigningCertificate")); 阅读全文
posted @ 2020-06-11 10:27 岭南春 阅读(187) 评论(0) 推荐(0)