NetBlog主题
2024-03-20 13:23
9874
JsonFileHelper.cs using Newtonsoft.Json;using Newtonsoft.Json.Linq;using System;using System.Collections.Generic;using System.IO;namespace JsonTest{//原创来自:http://www.luofenming.com/show.aspx?id=ART2019091500001 class JsonHelper { …
2024-01-06 15:33
221
开源地址 https://gitee.com/pojianbing/lazy-captcha工作原理:1、客户端向服务端获取验证码图片2、服务端 返回 验证码的标识ID和图片的base64图片的字符串3、客户端将服务端返回的 验证码ID和图片上内容 发送给服务端4、服务端验证 客户端发送的验证码是否正确本文来自 www.…
2023-12-21 21:33
335
视频讲解地址 https://www.bilibili.com/video/BV1XN4y1x758/1、添加服务(Nuget 安装 Microsoft.AspNetCore.Authentication.JwtBearer)//添加JWT身份验证服务builder.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme) .AddJwtBearer(options =…
2023-12-20 11:47
6078
相关的视频教程 https://www.bilibili.com/video/BV1664y1C7ko/ (如果不会请看我录制的视频教程)log4net.config配置文件?xml version="1.0" encoding="utf-8"?configuration configSections section name="log4net" type="log4net.Config.Log4NetConfig…
2023-07-27 23:15
560
允许所有跨域,在 startup.cs 中的 ConfigureServices 添加如下代码services.AddCors(options ={ options.AddPolicy("AllowAllCors", builder = builder.AllowAnyOrigin() .AllowAnyHeader() .AllowAnyMethod());});在 startup.cs 中…
2023-07-20 08:06
549
nginx.conf配置文件部分信息server { listen 80; server_name www.luofenming.com; location / { proxy_pass http://localhost:8711; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_set_header …
2022-10-14 08:43
2015
[HttpPost("Notify")]public string Notify(){ var data = Request.Form; Dictionarystring, string sArray = new Dictionarystring, string(); if (data.Keys.Count 0) { foreach (string k in data.Keys) { sArray[k] …
2022-10-13 14:48
1659
[HttpGet("Return")]public string Return(){ QueryString v = Request.QueryString; if (!string.IsNullOrEmpty(v.Value) && v.Value.Length 1) { string urldata = HttpUtility.UrlDecode(v.Value);//url数据解码 //1.去除第一个前导?字符…
2022-09-02 15:07
2728
以下是核心代码[HttpPost]public async Taskstring Image(IFormFile file){ ResultModel result = new ResultModel(); if (!new[] { "image/jpeg", "image/png" }.Contains(file.ContentType)) { result.code = 2; result.msg = "图片仅支持j…
2021-10-12 15:42
1766
1、客户端登入获取当前登入帐号信息1.1、客户端发送帐号和密码到他们端假设 用户ID:lqwvje 密码:1234561.2、服务端响应客户端服务端对客户端发送的帐号、密码、权限校验,如果都通过即返回用户信息( 用户ID:lqwvje 密码:123456 密钥:e10adc3949ba59abbe56e057f20f883e 权…