上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 74 下一页

2022年6月30日

asp.net core cookie认证

摘要: asp.net core版本:5.0 客户端:Vue 首先我们看一下服务端代码,在startup类的ConfigureServices函数中添加cookie认证: services.AddAuthentication(CookieAuthenticationDefaults.Authenticati 阅读全文

posted @ 2022-06-30 16:22 itjeff 阅读(239) 评论(0) 推荐(0) 编辑

.net core使用官方CookieAuthentication身份验证

摘要: 注入: public IServiceProvider ConfigureServices(IServiceCollection services) { //services.AddJwtAuthorization(Configuration); var types = new[] { typeof 阅读全文

posted @ 2022-06-30 16:21 itjeff 阅读(111) 评论(0) 推荐(0) 编辑

2022年6月29日

.net core 读取 appsetting.json

摘要: 文件 appsetting.json {"Logging": {"IncludeScopes": false,"LogLevel": {"Default": "Warning"}},"ConnectionStrings": {"DefaultConnection": "User ID=sa;Pass 阅读全文

posted @ 2022-06-29 10:26 itjeff 阅读(1162) 评论(0) 推荐(0) 编辑

2022年6月23日

HTTP重定向出现“正在中止线程”问题

摘要: Response.Redirect 产生的“正在中止线程”错误,将出现 ThreadAbortException 异常。原因:Response.End 方法终止页的执行,并将此执行切换到应用程序的事件管线中的 Application_EndRequest 事件。不执行 Response.End 后面 阅读全文

posted @ 2022-06-23 15:40 itjeff 阅读(62) 评论(0) 推荐(0) 编辑

2022年6月17日

MySQL报Data too long for column '......' at row 1解决方法

摘要: 今天设计了一张表 其中一个字段我设置的类型是 text 类型的 ,按照正常的情况下text 是不限制长度的,因此插入了一段很长的txt内容 ,结果出现了 悲剧性的事情,提示了 数据太长 Data too long for column '......' at row 1 这就很尴尬了,百度了半天,有 阅读全文

posted @ 2022-06-17 16:50 itjeff 阅读(1188) 评论(0) 推荐(0) 编辑

2022年6月15日

迭代器yield的使用

摘要: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading; using System.Threading.Tasks; namespace 阅读全文

posted @ 2022-06-15 00:07 itjeff 阅读(32) 评论(0) 推荐(0) 编辑

2022年5月8日

AddMvcCore,AddControllers,AddControllersWithViews,AddRazorPages的区别

摘要: 1.services.AddMvcCore() 只注册运行 Controller/Razor Pages 必要的核心服务,确保 Pipeline 程序可动作,其馀如像 Data Annotation Model Validation、身分验证等服务要自己加挂,除有特殊客制需求,一般不太常用。 2.s 阅读全文

posted @ 2022-05-08 11:26 itjeff 阅读(357) 评论(0) 推荐(0) 编辑

2022年5月4日

C#中HashTable的用法

摘要: 一,哈希表(Hashtable)简述 在.NET Framework中,Hashtable是System.Collections命名空间提供的一个容器,用于处理和表现类似keyvalue的键值对,其中key通常可用来快速查找,同时key是区分大小写;value用于存储对应于key的值。Hashtab 阅读全文

posted @ 2022-05-04 12:41 itjeff 阅读(109) 评论(0) 推荐(0) 编辑

.Net 中HashTable,HashMap 和 Dictionary<key,value> 和List<T>和DataTable的比较

摘要: 首先: (ling)在.Net 模仿java 的过程中 抛弃了 HashMap ,所以以后再去面试.Net的时候当别人问你HashTable 和HashMap 的区别的时候,请告诉他,C#.Net 中 没有HashMap 好接下来进入正题 .Net 中HashTable 和 Dictionary<k 阅读全文

posted @ 2022-05-04 12:36 itjeff 阅读(500) 评论(0) 推荐(0) 编辑

2022年4月30日

ES6的字符串模板

摘要: 字符串模板让我们再也不用拼接变量了,而且支持在模板里有简单计算操作。 字符串模版先来看一个在ES5下我们的字符串拼接案例: let bgColor='red';let divColor = '当前div背景颜色是'+bgColor+'';console.log(divColor); //当前div背 阅读全文

posted @ 2022-04-30 21:42 itjeff 阅读(542) 评论(0) 推荐(0) 编辑

上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 74 下一页

导航