摘要: 二级域名如何写cookie主站:www.zzm.com子站:shop.zzm.com<appSettings> <add key="EJJJCookieDomainName" value="zzm.com"/></appSettings>两个项目下的web.config都写入这个节点写cookie的时候读取此节点的value,把cookie写在此域名下。二级域名也就写进cookie了。#region 写登录Cookie public static int WriteCookie(string UserID, strin 阅读全文
posted @ 2012-02-16 15:50 周正明 阅读(736) 评论(0) 推荐(0) 编辑
摘要: 配置host文件 路径用记事本打开host文件127.0.0.1 www.dmt1.com前面的127.0.0.1 Ip地址是本机后面必须有空格,后面网址就是你的网站的域名。打开iis服务器新建网站点下一步后出现描述,描述的内容是host配置的网站域名。www.dmt1.com前面两个不用填。主机头还是添host域名主目录路径是项目的文件夹路径,只能打到DMT_Web那一层,就是输出页面的那一层。他的里面就是各个文件夹了。选中运行脚本在iis的左边新建的项目右键点属性—选择ASP.NET选项卡,版本选择选择主目录选项卡,点配置选中第一个点编辑进入下面窗口复制可执行文件可执行文件必须是 2.0的 阅读全文
posted @ 2012-02-16 10:06 周正明 阅读(534) 评论(0) 推荐(0) 编辑
摘要: public class Common { public static int WriteCookie(string UserID,string UserName,string UserSort) { HttpCookie userCookie = new HttpCookie("Coop"); userCookie.Domain = "e-jjj.com"; userCookie.HttpOnly = true; userCookie["CoopUName"] = UserName; userCookie["CoopUID 阅读全文
posted @ 2012-02-16 10:02 周正明 阅读(259) 评论(0) 推荐(0) 编辑
摘要: public static bool IsGUID( string expression ){if ( expression != null ){Regex guidRegEx = new Regex ( @"^(\{{0,1}([0-9a-fA-F]){8}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){4}-([0-9a-fA-F]){12}\}{0,1})$" );return guidRegEx.IsMatch ( expression );}return false;}public static string Ge 阅读全文
posted @ 2012-02-16 09:49 周正明 阅读(422) 评论(0) 推荐(0) 编辑
摘要: #region Encode/Decodepublic static string HtmlDecode( String textToFormat ){if ( IsNullorEmpty ( textToFormat ) )return textToFormat;return System.Web.HttpUtility.HtmlDecode ( textToFormat );}public static string HtmlEncode( String textToFormat ){if ( IsNullorEmpty ( textToFormat ) )return textToFor 阅读全文
posted @ 2012-02-16 09:48 周正明 阅读(196) 评论(0) 推荐(0) 编辑