2016年5月11日
摘要: 当类库写好后,以Debug或Release生成后,将.txt文件拷贝到dll所在的目录下,这时配置(或读取).txt文件的路径可以设置为://获取和设置包括该应用程序的目录的名称string txtUrl = System.AppDomain.CurrentDomain.SetupInformati 阅读全文
posted @ 2016-05-11 10:47 FIGHTING360 阅读(471) 评论(0) 推荐(0) 编辑
  2016年5月9日
摘要: 在一个页面中写入: FormsAuthentication.SetAuthCookie(username, true); 在另一个页面中写入: string name = Page.User.Identity.Name; 获取不到值的原因: 在web.config中加入: <authenticati 阅读全文
posted @ 2016-05-09 16:53 FIGHTING360 阅读(1057) 评论(0) 推荐(0) 编辑
  2016年5月6日
摘要: HTTP 错误 500.22 - Internal Server Error 检测到在集成的托管管道模式下不适用的 ASP.NET 设置。 处理方法:在项目属性中,将托管管道模式设置为“经典”。 阅读全文
posted @ 2016-05-06 10:24 FIGHTING360 阅读(1277) 评论(0) 推荐(0) 编辑
  2016年5月5日
摘要: c# 获取系统当前日期时间, 按照2016-05-05-13-00-00格式输出:string dtnow = string.Format("{0:yyyy-MM-dd-HH-mm-ss}", DateTime.Now); //24小时制 按照2016-05-05-01-00-00格式输出:stri 阅读全文
posted @ 2016-05-05 09:15 FIGHTING360 阅读(9617) 评论(1) 推荐(1) 编辑
  2016年5月3日
摘要: Visual Studio 2013下的Windows服务程序,在安装服务时出现"The system cannot execute the specified program",原因1: 文件不全,需要重新编译;原因2:配置文件有问题,比如出现value="... 少个引号等。 阅读全文
posted @ 2016-05-03 08:58 FIGHTING360 阅读(1206) 评论(0) 推荐(0) 编辑