摘要:
重点是拿到HttpContext 对象。 先从Headers["Cdn-Src-Ip"] 中取IP,其次从Headers["X-Forwarded-For"] 取,最后从context.Connection.RemoteIpAddress 中取。 有可能遇到“::ffff:192.168.2.131 阅读全文
摘要:
C#.NET FRAMEWORK ASP.NET MVC 获取客户端IP 工具类: using System; namespace CommonUtils { public static class ClientIpUtil { public static string GetClientIpMvc 阅读全文
摘要:
使用NPOI导入.xlsx遇到“EOF in header”报错,网上找好很多方法,没解决,最后换成EPPlus.Core导入。 导出默认是.xls。 NPOI 操作类: using NPOI.HPSF; using NPOI.HSSF.UserModel; using NPOI.SS.UserMo 阅读全文