Stangray
SAP THQ Apple Nintendo Google Reynolds Amazon Yahoo
摘要: 为什么还是那句话,在网上找了N篇Session共享,但真正可以直接解决问题的还是没有找到。一、以下为本人亲测,为防止环境不一致,对本文产生歧义,限定环境如下:1. IIS7.02. Asp.net 的站点3. StateServer模式,数据库及自定义配置不在本文讨论范围。4. 192.168.1.41 (主站点服务器,域名:www.xxx.com) ,192.168.1.43 (业务分发服务器 域名:BDN1.xxx.com)5. 实现的跨域也只是跨子域的方法。(因为最终都是读取根域下的Cookie来读取SessonID共享的)二、配置主站点服务器web.config1. 将模式改为 Sta 阅读全文
posted @ 2013-09-18 11:17 Stangray 阅读(3186) 评论(0) 推荐(1) 编辑
摘要: 网找了好久没有找到相关的资料,都是提问的没有回答,在这里发一下,做为笔记吧!第一步:准备资料 开通汇付天下后,需要从http://mas.chinapnr.com/gam 下需二个签名验签DLL文件(ChinaPnr.dll,pnrpay.dll),这个是用来做RSA加解密的.另外分别是两个Key文件,分别提公钥与私钥文件.例如:PgPubk.key与MerPrK510010.key.第二步:官方推荐是在服务器上注册DLL文件 例如你将DLL文件放在C:/DLL文件夹下面。则在“开始”-“运行”中输入regsvr32 C:\DLL\ChinaPnr.dll,个人不推荐这样做,特别有的朋友是用. 阅读全文
posted @ 2012-06-04 15:08 Stangray 阅读(2046) 评论(2) 推荐(1) 编辑
摘要: public static DataSet GetPrivateItemList(HtmlDocument htmlDocument) { DataSet ds = new DataSet(); HtmlElementCollection TableCollection = htmlDocument.GetElementsByTagName("TABLE"); int tableIndex = 1; foreach (HtmlElement tableElement in TableCollection) { HtmlElementCollection TrCollecti 阅读全文
posted @ 2011-05-24 12:30 Stangray 阅读(1524) 评论(0) 推荐(0) 编辑
摘要: 发现Window版本的Squid 和 Linux 配置有点不一样一、配置squid\etc目录1.squid.conf.default 拷贝一份重新命名为squid.conf2.cachemgr.conf.default拷贝一份重新命名为cachemgr.conf3.mime.conf.default拷贝一份重新命名为mime.conf二、编辑squid.conf 文件:1.http_port 80 vhost #访问的端口2.cache_peer 192.168.1.3 parent 80 0 no-query originserver #需要编辑的站点IP及端口3.visible_host 阅读全文
posted @ 2010-12-17 09:35 Stangray 阅读(3488) 评论(0) 推荐(0) 编辑
摘要: 整行语句:select * from dbo.FreightRate where enabled=0 and createddate < (select max(createddate) as mx from (select top 100 createddate from dbo.FreightRate where order by createddate)a)分解说明:--按时间取前10... 阅读全文
posted @ 2010-11-12 10:15 Stangray 阅读(292) 评论(0) 推荐(0) 编辑
摘要: 记在这里怕忘了sp_configure 'show advanced options', 1;GORECONFIGURE;GOsp_configure 'clr enabled', 1;GORECONFIGURE;GO 阅读全文
posted @ 2010-10-26 10:04 Stangray 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 1.最简单的方法 在字段后面加上字符集 [field] collate Chinese_PRC_CI_AS2.select serverproperty('collation') --查询当前字符集3.alter database databaseName collate Chinese_PRC_CI_AI --更改字符集4. select databasepropertyex('database... 阅读全文
posted @ 2010-10-19 14:30 Stangray 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 原理:  很简单,服务器第一次向浏览器输出Head时,添加[LastModified]时间标识,浏览器再次向服务器请求时,会带上时间标识[If-Modified-Since].然后,在服务端判断时间就可以了,返回未修改304代码: 阅读全文
posted @ 2010-10-14 13:27 Stangray 阅读(864) 评论(0) 推荐(0) 编辑
摘要: 有的时候想要在编译成DLL的网站上添加一个功能,又需要访问数据库,但源码又找不到,这个时候怎么修改呢!下面给出一个方法1. 在Web.config 添加数据库连接字符串<connectionStrings>  <add name="DbConnectionString" connectionString="server=(local);database=test;uid=test... 阅读全文
posted @ 2010-09-29 11:40 Stangray 阅读(408) 评论(0) 推荐(0) 编辑
摘要: 使用Jet.OLEDB,虽然有很多的局限性.但他无疑是与DataTable操作最方便的方法了.速度也很快.NPOI有点慢.1.链接:string connstr = string.Format("Provider=Microsoft.Jet.OLEDB.4.0;Data Source={0};Extended Properties='Excel 8.0;HDR=Yes;IMEX={1};'",物理... 阅读全文
posted @ 2010-08-20 09:35 Stangray 阅读(2077) 评论(1) 推荐(0) 编辑