- 博客(34)
- 资源 (1)
- 收藏
- 关注
原创 npm : 无法加载文件 C:\Program Files\nodejs\npm.ps1,因为在此系统上禁止运行脚本。有关详细信息,请参阅 https:/go.microsoft.com/fwlink
微软官方文档:about_Execution_Policies - PowerShell | Microsoft Learn
2024-11-20 10:53:10
4617
1
原创 .net6 当连接用户的shell断掉后,dotnet会自动关闭,达不到长期运行的效果。.NET 进程守护
Systemd是一个系统管理守护进程、工具和库的集合,用于取代System V初始进程。Systemd的功能是用于集中管理和配置类UNIX系统。Systemctl是一个systemd工具,主要负责控制systemd系统和服务管理器。如:/etc/systemd/system/testDemoSer.service。6.4 分析systemd启动进程。6.5分析启动时各个进程花费时间。
2024-07-09 16:12:08
731
原创 RedisTemplate.opsForValue().set redis赋值实体对象时出现异常。
异常代码:controller类。解决方案:book实体类,继承。
2023-12-22 10:33:31
1361
原创 龙芯安装jexus遇到的问题,jexus启动失败原因之一
jexus启动失败。/usr/jexus/jwss: relocation error: /lib64/libk5crypto.so.3: symbol EVP_KDF_ctrl version OPENSSL_1_1_1b not defined in file libcrypto.so.1.1 with link time reference
2023-08-17 11:18:41
728
原创 VS2022 将本地项目发布到Gitee
8、此时修改的代码仅仅提交到了本地库,还没有提交到Gitee。7.右键已修改的文件,选择Git提交或存储。4、VS2022打开项目,添加到源代码管理。6、任意更改后提交代码到仓库。可以看到Gitee仓库已更新。8、勾选修改后全部提交。可以看到代码已经提交。
2022-11-08 09:41:35
8126
5
原创 CORE 执行 dotnet ef命令 迁移时 包 Pomelo.EntityFrameworkCore.MySql 消失
CORE 执行 dotnet ef命令 迁移时 包 Pomelo.EntityFrameworkCore.MySql 消失
2022-08-17 16:26:05
294
原创 .NET6 创建ASP.NET Core MVC 没有 Startup 类、没有 ConfigureServices 方法
通过.NET6 创建的ASP.NET Core MVC项目没有没有 Startup 类和ConfigureServices 方法
2022-08-16 14:35:04
8811
原创 IdentityServer Checking for expected scope openid failed
请求connect/userinfo 时请求失败403,Checking for expected scope openid failed
2022-08-12 15:09:39
391
原创 .NET6 AspNetIdentity 默认数据库 Sqlite 迁移到 MySql 遇到问题
.NET6中使用 ASP.NET Core Identity 将默认数据库 Sqlite 迁移到 MySql 遇到的一些问题
2022-08-09 10:43:20
670
原创 IIS站点下部署站点 HTTP 错误 500.19 - Internal Server Error
(IIS站点下部署站点)HTTP 错误 500.19 - Internal Server Error无法访问请求的页面,因为该页的相关配置数据无效。
2021-12-07 17:28:56
353
原创 ZipFile压缩,压缩在第一层
ZipFile压缩,压缩在第一层 using (ZipFile zip = ZipFile.Create(filePath)) { string filePath = "保存压缩文件的路径"; zip.BeginUpdate(); zip.SetComment("zip"); foreach (string item in
2020-09-11 11:59:57
424
原创 C# 下载url文件 WebClient、HttpWebRequest
WebClient<param name="saveFilePath">保存路径</param> <param name="saveFileName">保存文件名称</param> WebClient client = new WebClient();client.DownloadFile(url, saveFilePath + saveFileName);HttpWebRequest HttpWebRequest request = Ht
2020-09-03 15:25:36
381
原创 c# FileStream、Stream 转 byte[]; byte[]转base64
FileStream继承了Streampublic byte[] ToByte(Stream stream) { byte[] bytes; using (var ms = new MemoryStream()) { stream.CopyTo(ms); bytes = ms.ToArray(); } ret
2020-09-03 15:20:36
3699
原创 c# webapi 返回指定ContentType
c# webapi 返回指定ContentType//文件虚拟路径string path = System.Web.Hosting.HostingEnvironment.MapPath(@"~/");//存放的测试文件System.IO.FileStream fs = new System.IO.FileStream(path + "47.png", System.IO.FileMode.Open, System.IO.FileAccess.Read);HttpResponseMessage re
2020-09-03 15:11:12
1576
原创 c# webapi处理请求文件接口返回的Content-Type →text/plain
c# webapi处理请求文件接口返回的Content-Type →text/plain通过Header中的Content-Disposition属性获取文件名称和扩展名称HttpWebResponseWebClient通过Header中的Content-Disposition属性获取文件名称和扩展名称HttpWebResponse HttpWebResponse response = request.GetResponse() as HttpWebResponse; //文件名称string f
2020-09-03 11:56:05
2770
原创 mysql查询优化之 FORCE INDEX
mysql查询优化之 FORCE INDEXMySQL force index 强制索引目的是使其优先使用该索引筛选数据;select * from TableName FORCE INDEX (索引名称) where 条件
2020-08-26 10:18:43
396
原创 泛型对象赋值并返回泛型对象
public T GetPageFromModel<T>() { //T t= default(T); var type = typeof(T); object o = Activator.CreateInstance(type); PropertyInfo[] pero...
2020-08-25 17:07:29
281
原创 AbsoluteExpiration 必须为 DateTimeOffset.MaxValue,或 SlidingExpiration 必须为 TimeSpan.Zero。
AbsoluteExpiration绝对时间过期不能与SlidingExpiration对象时间内内没有得到访问时,就会过期。报错代码: CacheItemPolicy policy = new CacheItemPolicy() ; policy.AbsoluteExpiration = DateTime.Now.AddMinutes(3); ...
2020-08-25 17:07:18
333
原创 .net webapi 返回XML格式化数据(非字符串)
.net WebAPI 返回XML格式化数据(非字符串)方式一: HttpResponseMessage result = Request.CreateResponse<List<Student>>(HttpStatusCode.OK, list, Configuration.Formatters.XmlFormatter); return result;效果:方式二: XmlDocument doc11 = new XmlDocument();
2020-08-25 16:57:04
1055
原创 VS Visual Studio 从元数据 无注释 注释为英文
1、项目右键 属性查看目标框架2、找到.net framework不同版本dll存放路径;我的电脑是C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework (64位机)3、 注释存放的目录是目标框架版本对应文件夹下的 \zh-Hans文件夹4、 查看zh-Hans文件夹下的xml文件是否...
2019-12-06 11:09:41
2258
转载 mysql自增id 重置
tableName(表名称),columnName(自增列名称)1、删除自增列alter table tableName drop columnName;--删除自增列2、添加自增列alter table tableName add columnName int(0) not null first;--添加自增列3、设置为主键并自增alter table table...
2019-05-16 15:16:19
1525
转载 前端身份证效验
function checkCertificateNo(inputParams){ var Errors = new Array("OK", "1", "2", "3", "4"); var certificateNo = inputP...
2019-05-13 16:59:10
988
原创 UCML 前端非空验证
需要在lable处添加*标识,验证范围:输入框、下拉框、日期框遍历带*号的function NoEmptyVerification() {var controls = $(".u-label-control:contains('*')");for (var i = 0; i < controls.length; i++) {var checkI...
2019-05-13 16:57:33
254
转载 SQL Server 2012 远程过程调用失败。[0x800706be]
如图解决方法:右键SQL Server 配置管理器查看属性,将C:\Windows\SysWOW64\mmc.exe /32 C:\Windows\SysWOW64\SQLServerManager10.msc,改成:C:\Windows\SysWOW64\mmc.exe /32 C:\Windows\SysWOW64\SQLServerManager11.mscWindows 1...
2018-11-20 09:25:40
2880
3
sweetalert(js,css,html).zip
2019-05-16
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人