摘要: 1.获取ip和端口 string str = (Request.HttpContext.Connection.LocalIpAddress.MapToIPv4().ToString() + ":" + Request.HttpContext.Connection.LocalPort); 输出str, 阅读全文
posted @ 2019-01-18 16:47 青橙时光 阅读(4596) 评论(0) 推荐(0) 编辑
摘要: 1. NuGet包引用 Microsoft.AspNetCore.Session 2. Startup.cs中的相应方法加入些代码: public void ConfigureServices(IServiceCollection services) { //添加session services.A 阅读全文
posted @ 2019-01-18 14:42 青橙时光 阅读(557) 评论(1) 推荐(0) 编辑
摘要: var message = new MimeMessage(); //发送方 message.From.Add(new MailboxAddress("liyy", "xxxxx.com")); //接受方 message.To.Add(new MailboxAddress("Mrs. li", " 阅读全文
posted @ 2019-01-15 14:20 青橙时光 阅读(683) 评论(1) 推荐(0) 编辑
摘要: // 设置cookie function setCookie(name, value, seconds, domain) { seconds = seconds || 0; // seconds有值就直接赋值,没有为0,这个根php不一样。 var expires = ""; if (seconds 阅读全文
posted @ 2018-12-29 15:14 青橙时光 阅读(710) 评论(0) 推荐(0) 编辑
摘要: 1.添加QRCoder包引用 2. public IActionResult MakeQrCode() { string url="https://www.baidu.com"; var generator = new QRCodeGenerator(); var codeData = genera 阅读全文
posted @ 2018-12-28 15:06 青橙时光 阅读(813) 评论(3) 推荐(0) 编辑