随笔分类 -  ASP.NET MVC

摘要:using Ionic.Zlib; using System; using System.IO; using System.Linq; using System.Net.Http; using System.Threading; using System.Threading.Tasks; using 阅读全文
posted @ 2022-12-16 17:21 兴趣就是天赋 编辑
摘要:只需要在web.config中设置machineKey即可 <!--生成网址:https://www.fishlee.net/Tools/MachineKeyGenerator--><machineKey validationKey="9BD7FDEC53333A739CFBF4798CDBB9E9 阅读全文
posted @ 2022-12-07 14:41 兴趣就是天赋 编辑
摘要:/// <summary> /// 验证码生成 /// </summary> public class VerificationCodeHelper { //定义颜色 private static Color[] colors = { Color.Black, Color.Red, Color.Da 阅读全文
posted @ 2022-11-07 09:20 兴趣就是天赋 编辑
摘要:/// <summary> ///验证码 /// </summary> public class VerifyCode { /// <summary> /// 验证码字体大小 ( 为了显示扭曲效果,默认 40 像素,可以自行修改 ) /// </summary> int FontSize = 40; 阅读全文
posted @ 2022-11-07 09:12 兴趣就是天赋 编辑
摘要:一、配置代码 SwaggerConfig.cs using Swashbuckle.Application; using Swashbuckle.Swagger; using System; using System.Collections.Concurrent; using System.Coll 阅读全文
posted @ 2022-11-04 12:08 兴趣就是天赋 编辑
摘要:using System.Web.Http; using Swashbuckle.Application; using System; using Swashbuckle.Swagger; using System.Web.Http.Description; using System.Collect 阅读全文
posted @ 2022-07-08 17:35 兴趣就是天赋 编辑
摘要:效果图: 阅读全文
posted @ 2019-07-26 11:49 兴趣就是天赋 编辑
摘要:参考效果: 参考代码: 阅读全文
posted @ 2019-02-28 16:45 兴趣就是天赋 编辑
摘要:/// <summary> /// 自定义鉴权 /// </summary> public class WebApiAuthAttribute : AuthorizeAttribute { /// <summary> /// 权限验证 /// </summary> /// <param name=" 阅读全文
posted @ 2018-09-10 12:52 兴趣就是天赋 编辑
摘要:js加密包地址 https://pan.baidu.com/s/1ha2i-e9WiRCIkMjrHZcLuw https://www.oschina.net/p/crypto-js 参考网站:https://www.cnblogs.com/wz122889488/p/6899615.html 阅读全文
posted @ 2018-07-08 19:42 兴趣就是天赋 编辑
摘要://一、首先是登录: public class AccountController : BaseController { public ActionResult Login() { //已经登录的,直接到默认首页 if (HttpContext.Request.IsAuthenticated) { retu... 阅读全文
posted @ 2014-11-19 15:31 兴趣就是天赋 编辑

点击右上角即可分享
微信分享提示