随笔分类 - ASP.Net
摘要:在.Net 4.0之前,一直是依靠HttpWebRequest实现Http操作的。它默认有一个非常保守的同一站点下最大2并发数限制,导致默认情况下HttpWebRequest往往得不到理想的速度,必须修改App.config或ServicePointManager.DefaultConnection
阅读全文
摘要:Azure WebSite服务默认是不提供黑白名单,也就是说任何Internet用户都可以访问Azure WebSite,那么我们如何来给我们的网站设置黑白名单? 这里有一种方式,可以通过配置网站的配置文件(Web.config)来设置访问的黑白名单。 1、通过VS新建一个ASP.Net MVC项目
阅读全文
摘要:Linux Disibutaion:Ubuntu 16.04.1 LTS Web Server:Nginx、Kestrel 安装.net core 安装npm,gulp,bower 安装nginx 因为要使用nginx做asp.net core网站的反向代理,我们需要修改nginx的默认配置文件/e
阅读全文
摘要:Linux Disibutaion:Ubuntu 16.04.1 LTS Web Server:Nginx、Kestrel 关于如何在linux中部署asp.net core我这里不再详细介绍,可以参考ASP.Net Core 运行在Linux(Ubuntu) 这里我需要三台VM:nginxvm01
阅读全文
摘要:Linux Disibutaion:CentOS 7.1 Web Server:Apache、Kestrel 1、安装.net core 2、新建asp.net core mvc项目 3、安装npm,gulp,bower 4、发布项目 5、安装并配置Apache 进入/etc/httpd/conf.
阅读全文
摘要:这段时间一直在研究asp.net core部署到linux,今天终于成功了,这里分享一下我的部署过程。 Linux Disibutaion:Ubuntu 14.04 Web Server:nginx、Kestrel 1、安装.net core 2、安装.net core成功之后,新建asp.net
阅读全文
摘要:关于Log4Net配置主要分几步 第一步:下载log4net.dll(log4net官网:http://logging.apache.org/log4net/download_log4net.cgi) 第二步:在项目中添加对log4net.dll的引用 第三步:配置log4net <?xml ver
阅读全文
摘要:public void ProcessRequest (HttpContext context) { context.Response.ContentType = "image/jpeg"; //获得验证码符号 string code = GetCode(); Image img = GetImage(code); //保存生成的验证码图片 img.Save(context.Response.OutputStream, ImageFormat.Jpeg); } /// /// 生成验...
阅读全文