随笔分类 - 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
阅读全文
摘要:只需要在web.config中设置machineKey即可 <!--生成网址:https://www.fishlee.net/Tools/MachineKeyGenerator--><machineKey validationKey="9BD7FDEC53333A739CFBF4798CDBB9E9
阅读全文
摘要:/// <summary> /// 验证码生成 /// </summary> public class VerificationCodeHelper { //定义颜色 private static Color[] colors = { Color.Black, Color.Red, Color.Da
阅读全文
摘要:/// <summary> ///验证码 /// </summary> public class VerifyCode { /// <summary> /// 验证码字体大小 ( 为了显示扭曲效果,默认 40 像素,可以自行修改 ) /// </summary> int FontSize = 40;
阅读全文
摘要:一、配置代码 SwaggerConfig.cs using Swashbuckle.Application; using Swashbuckle.Swagger; using System; using System.Collections.Concurrent; using System.Coll
阅读全文
摘要:using System.Web.Http; using Swashbuckle.Application; using System; using Swashbuckle.Swagger; using System.Web.Http.Description; using System.Collect
阅读全文
摘要:/// <summary> /// 自定义鉴权 /// </summary> public class WebApiAuthAttribute : AuthorizeAttribute { /// <summary> /// 权限验证 /// </summary> /// <param name="
阅读全文
摘要:js加密包地址 https://pan.baidu.com/s/1ha2i-e9WiRCIkMjrHZcLuw https://www.oschina.net/p/crypto-js 参考网站:https://www.cnblogs.com/wz122889488/p/6899615.html
阅读全文
摘要://一、首先是登录: public class AccountController : BaseController { public ActionResult Login() { //已经登录的,直接到默认首页 if (HttpContext.Request.IsAuthenticated) { retu...
阅读全文