随笔分类 -  MVC

搭建Swagger框架时,浏览不到Swashbuckle.AspNetCore包的简单解决办法
摘要:什么是Swagger? Swagger是一款RESTFUL接口的文档在线自动生成+功能测试的软件。 Swagger是一个规范和完整的框架,用于生成、描述、调用和可视化RESTFUL风格的Web服务。 1、首先找到项目中的“依赖项” >"管理NuGet程序包" 2、然后点开包源管理里面的设置: 3、复 阅读全文
posted @ 2022-10-08 14:06 asp恒心 阅读(572) 评论(0) 推荐(0)
笛卡尔积算法,商品 规格属性组合sku
摘要:public static class UtilCombine { /// <summary> /// 笛卡尔乘积算法 /// </summary> public static List<List<T>> CartesianProduct<T>(this List<List<T>> lstSplit 阅读全文
posted @ 2022-02-11 13:32 asp恒心 阅读(518) 评论(0) 推荐(0)
【转载】C#防SQL注入过滤危险字符信息
摘要:不过是java开发还是C#开发或者PHP的开发中,都需要关注SQL注入攻击的安全性问题,为了保证客户端提交过来的数据不会产生SQL注入的风险,我们需要对接收的数据进行危险字符过滤来防范SQL注入攻击的危险,以下是C#防止SQL注入攻击的一个危险字符过滤函数,过滤掉相应的数据库关键字。 主要过滤两类字 阅读全文
posted @ 2021-12-07 09:47 asp恒心 阅读(777) 评论(0) 推荐(0)
C# 获取文件的后缀,文件名和路径
摘要:现有一个文件路径为: localFilePath=”C:\Users\yhood\Desktop\林业局考勤06.xlsx“ string directory = Path.GetDirectoryName(localFilePath); //文件所在路径 C:\Users\yhood\Deskto 阅读全文
posted @ 2021-08-09 18:24 asp恒心 阅读(497) 评论(0) 推荐(0)
C# 移除HTML标签
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions; namespace Common{ public stati 阅读全文
posted @ 2021-07-24 09:57 asp恒心 阅读(533) 评论(0) 推荐(0)
C# FormData 文件太大报错404 Form表单上传大文件,无法进入后台Action,页面提示404.
摘要:web.config中添加如下节点 <system.webServer> <security> <requestFiltering > <requestLimits maxAllowedContentLength="1073741824" ></requestLimits> </requestFil 阅读全文
posted @ 2019-09-03 21:02 asp恒心 阅读(572) 评论(0) 推荐(0)
ASP.NET API Helper Page 创建并生成相关帮助文档
摘要:https://blog.csdn.net/willianyy/article/details/79224738 阅读全文
posted @ 2019-05-20 10:30 asp恒心 阅读(86) 评论(0) 推荐(0)
C# Server.MapPath的使用方法
摘要:(1)WebForm中: HttpContext.Current.Server.MapPath("~/Files/car/"); (2)Mvc中: Server.MapPath() (3)最底层的写法: String path = AppDomain.CurrentDomain.SetupInfor 阅读全文
posted @ 2019-03-05 15:38 asp恒心 阅读(380) 评论(0) 推荐(0)