asp.net 2.0 ÏÂµÄ±íµ¥ÑéÖ¤CookielessÊôÐÔ
ÔÚ²»Ö§³ÖCookiesµÄÒƶ¯É豸ģÄâÆ÷ÖÐÎÞ·¨Õý³£½øÐÐ±íµ¥ÑéÖ¤,ÁªÏëµ½×òÌìʹÓÃweb.configÉèÖÃcookielessÊôÐÔʱ»áÔÚ·ÃÎÊʱ»á³öÏÖ"Cannot use a leading .. to exit above the top directory"µÄÒì³£,×ÔÈ»¶øÈ»µÄÎÒ¾ÍÏëµ½ÁËÇ°Ò»¶Îʱ¼äÀ§ÈÅÎҺܾõÄÒ»¸öÕ¾µãÒì³£ÎÞ·¨Ê¹ÓÃÇ°µ¼ .. ÔÚ¶¥¼¶Ä¿Â¼ÉÏÍ˳ö(Cannot use a leading .. to exit above the top directory)¡£×ÛºÏһϣ¬ÖÕÓÚÀí½âÁËΪʲô»á³öÏÖÕâÑùµÄÒì³££¬Ò²Àí½âÁËΪʲôÔÚasp.net 2.0 ÖУ¬½«ÔÀ´cookielessÊôÐÔÖ»ÄÜÉèÖÃtrue|false£¬¸Ä³ÉÁË¿ÉÒÔÉèÖÃö¾ÙHttpCookieModeµÄÖµ,·Ö±ðΪ:AutoDetect,UseCookies,UseDeviceProfile,UseUri ¡£
Èç¹û¶Ô±íµ¥ÑéÖ¤ºÜÓоÑéµÄÅóÓÑ¿ÉÄÜ»áºÜÇå³þ£¬¿ÉÒÔÓÐÁ½ÖÖ·½Ê½À´±£´æµ±Ç°µÄSessionIDºÍÓû§µÄÑé֤ƱÐÅÏ¢£¬·Ö±ðÊÇʹÓÃCookieºÍÔÚURLµØÖ·¼ÓÉÏÒ»´®±àÂë¹ýµÄ×Ö·û´®À´±êʶµ±Ç°µÄSessionIDºÍÓû§µÄÑé֤ƱÐÅÏ¢¡£µÚÒ»ÖÖ·½Ê½·Ç³£Æձ飬¶ÔÓÚʹÓÃURIÀ´±êʶµ±Ç°SessionIDºÍÑé֤Ʊ£¬ÎÒÏàÐÅÈç¹û²»ÊÇÌØÊâÐèÒªµÄ»°£¬ÏàÐźܶàÈ˶¼»á¸úÎÒÒ»Ñù»¹ÎÞ·¨ºÜºÃÀí½â¡£ÎÒ×öÁËÁ½¸ö¼òµ¥µÄÒ³Ã棬À´Ä£ÄâÓû§µÄÑéÖ¤¹ý³Ì¡£µ±ÎÒÔÚweb.configÖÐÉèÖÃcookieless="AutoDetect"ʱ£¬¾Í¸úÎÒÃÇƽ³£Ò»Ñù£¬µÇ¼µÄURLÊÇ£º
http://localhost:1115/FormsAuthentication/Security/Default.aspx
¶øµ±ÎÒÉèÖÃcookieless="UseUri"ʱ£¬ÕâʱURLµØÖ·¾Í±ä³ÉÁË£º
http://localhost:1115/FormsAuthentication/(F(V0-gEZNEzXUqevbOqKwNoBcMf6vBWnyNbdpa2UhZzrfOUkGPvyB91-9nFlnBDmCAgdpz4gJ6kq-QOVjbNsvKig2))/Security/Default.aspx
ÔÚÕ¾µãĿ¼¶àÁËÒ»¼¶Ä¿Â¼£¬ÕâÀïµÄÖµ¾ÍÊǵ±Ç°»áÓû§µÄÑé֤ƱÐÅÏ¢ºÍSessionIDÐÅÏ¢¡£ÔÚijЩ³¡ºÏ£¬ÕâÑù×öÊǷdz£ÓÐÒâÒåµÄ£¨»òÕßÊDZØÐëµÄ£©£¬ÒòΪÔÚ²»Ö§³Öcookie»·¾³Ï£¬ÄãҪȥ±êʶһ¸öÊÇ·ñÊôÓÚͬһ¸ö»á»°£¬µ±Ç°Óû§ÊÇ·ñÒÑÑéÖ¤¹ý£¬µÈµÈÓë»á»°Ïà¹ØÐÅÏ¢µÄʱºò¾Í»á±äµÃÒì³£µÄÀ§ÄÑ¡£
Á˽âÁËÕâÁ½¸ö±£´æ»á»°ÐÅÏ¢µÄ·½Ê½ºó,ÎÒÃÇÔÙÀ´ÌÖÂÛÒ»ÏÂ,asp.net teamΪʲô°ÑÔÀ´Ö»ÄÜÉèÖÃtrue | falseµÄÊôÐԸijɿÉÒÔÉèÖò»Í¬µÄö¾ÙÖµ.Ê×ÏÈÎÒÃÇÀ´¿´¿´Õâ4¸öÖµµÄº¬Òâ(ÔÚWindows Live Writer ²»ÄÜ»±í¸ñ :< ):
AutoDetect:×Ô¶¯¼ì²â¿Í»§¶Ëʵ¼ÊÊÇ·ñÖ§³ÖcookieÔÙÀ´¾ö¶¨Ê¹ÓÃÁ½ÖÖ·½Ê½ÖеÄÄÄÒ»ÖÖ(×î¼ÑÊÊÓ¦)¡£
UseCookies:²»¹Ü¿Í»§¶ËÊÇ·ñÖ§³Öcookie,·´Õý¶¼Ê¹ÓÃcookieÀ´±êʶ(µÚÒ»ÖÖ·½Ê½)¡£
UseDeviceProfile:¸ù¾ÝÉ豸ÎļþÀ´ÅжÏÊÇ·ñÖ§³Öcookie,½ø¶ø¾ö¶¨Ê¹ÓÃÄÄÖÖ·½Ê½¡£ÏàÐźܶàÈ˶¼¶ÔÕâ¸ö¸ÅÄîºÜÄ£ºý£¬ÓÉÓÚ×î½üÔÚÑо¿WAP£¬ËùÒÔ¶ÔËüÓÐÒ»
Ïà¹ØÎĵµ£º
ÏȽ¨¸öhtmlÄ£°æÒ³(template.htm)£º
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>$title</title>
</head>
&l ......
1¡¢½çÃæ´úÂ룺
<asp:GridView ID="gridTemplateDetailList" runat="server"
AutoGenerateColumns="False"
&nbs ......
VS2005+SQL2005 ASP.NET2.0Êý¾Ý¿âÁ¬½Ó×ܽá
ͨ¹ýÉÏƪÎÄÕ£¨http://www.cnblogs.com/user34j/archive/2007/01/23/628426.html£©µÄÉèÖÃÆäʵÒѾ²î²»¶àÍê³ÉÁË£¬Ö»ÊÇ»¹ÓÐһЩϸ½ÚµÄµØ·½Ã»ÓÐ×öºÃ£¬¾¹ýÒ»·¬Ñо¿ÏÖÔÚÖÕÓڸ㶨ÁË¡£¶ÔÓÚÏñÎÒÕâÑùµÄÐÂÊÖÀ´Ëµ£¬Õû¸öÊý¾Ý¿âÁ¬½ÓÕæÊDz»ÈÝÒס£ÏÖ×ܽáÈçÏ£ ......
Session¼´»á»°£¬ÊÇÖ¸Ò»¸öÓû§ÔÚÒ»¶Îʱ¼äÄÚ¶Ôijһ¸öÕ¾µãµÄÒ»´Î·ÃÎÊ¡£
Session¶ÔÏóÔÚ.NETÖжÔÓ¦HttpSessionStateÀ࣬±íʾ“»á»°×´Ì¬”£¬¿ÉÒÔ±£´æÓ뵱ǰÓû§»á»°Ïà¹ØµÄÐÅÏ¢¡£
Session¶ÔÏóÓÃÓÚ´æ´¢´ÓÒ»¸öÓû§¿ªÊ¼·ÃÎÊij¸öÌض¨µÄaspxµÄÒ³ÃæÆ𣬵½Óû§À뿪Ϊֹ£¬Ìض¨µÄÓû§»á»°ËùÐèÒªµÄÐÅÏ¢¡£Óû§ÔÚÓ¦ÓóÌÐòµ ......