Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ASP.NETʹÓÃÎÞCookieµÄ±íµ¥ÈÏ֤Ʊ¾Ý

ASP.NET
ʹÓÃÎÞCookieµÄ±íµ¥ÈÏ֤Ʊ¾Ý
ĬÈÏÇé¿öÏ£¬forms authentication system½«¾ö¶¨Êǽ«Æ±¾Ý´æ´¢ÔÚcookies
collectionÀﻹÊDzåÈëÓû§·ÃÎÊÒ³ÃæµÄURLÀï¡£ËùÓÐÖ÷Á÷µÄ×ÀÃæä¯ÀÀÆ÷£¬±ÈÈçInternet
Explorer£¬Firefox£¬Opera£¬»òSafari¶¼Ö§³Öcookies£¬µ«²¢·ÇËùÓеÄÒƶ¯É豸¶¼Ö§³Ö¡£
forms authentication systemʹÓúÎÖÖcookie²ßÂÔ£¬È¡¾öÓÚ
ÔªËØÀïµÄcookielessÉèÖã¬Ëü¿ÉÒÔÓÐÈçÏÂËÄÖÖÅäÖãº
.UseCookies——Ö¸¶¨×ÜÊÇʹÓûùÓÚcookieµÄƱ¾Ý
.UseUri——Ö¸¶¨´Ó²»Ê¹ÓûùÓÚcookieµÄƱ¾Ý
.AutoDetect——Èç¹ûdevice
profile²»Ö§³Öcookies£¬¾Í²»Ê¹ÓûùÓÚcookieµÄƱ¾Ý£»Èç¹ûdevice
profileÖ§³Öcookies£¬ÄÇô¾ÍÔËÓÃÒ»ÖÖ̽²â»úÖÆÀ´ÅжÏÊÇ·ñ¿ÉÒÔʹÓÃcookies.
.UseDeviceProfile——ÕâÊÇĬÈÏÖµ£¬Èç¹ûdevice
profileÖ§³Öcookies£¬¾ÍʹÓûùÓÚcookieµÄƱ¾Ý£¬²»ÔËÓÃ̽²â»úÖÆ¡£
ÆäÖУ¬AutoDetect ºÍ
UseDeviceProfileÑ¡ÏÒÀ¿¿Ò»¸ödevice
profileÀ´ÅжÏÊÇʹÓûùÓÚcookie»¹ÊÇÎÞcookieµÄƱ¾Ý¡£ASP.NETÓÐÒ»¸ö¹ØÓÚÕâÖÖdevices¼°ÆäÐÔÄܵÄÊý¾Ý¿â£¬±ÈÈçijÖÖ
devicesÊÇ·ñÖ§³Öcookies£¬ËüÖ§³ÖÄǸö°æ±¾µÄJavaScriptµÈÐÅÏ¢¡£Ã¿´Î£¬µ±Ò»¸ödeviceÏò·þÎñÆ÷·¢³ö¶Ôij¸öÒ³ÃæµÄÇëÇóʱ£¬¸ÃÇëÇó
Àォ°üº¬Ò»
¸öÃûΪ“user-agent”µÄHTTP
header£¬ÓÃÓÚ±íÃ÷deviceµÄÀàÐÍ¡£ASP.NET
½«×Ô¶¯µÄ°ÑÌṩµÄuser-agent×Ö·û´®ÓëÊý¾Ý¿âÀïÏàÓ¦µÄÐÅϢƥÅäÆðÀ´¡£
×¢Ò⣺
¸ÃÊý¾Ý¿â
´æ´¢ÔںܶàµÄXMLÎļþÀï.ÕâЩĬÈϵÄdevice
profileÎļþ£¬Æä·¾¶Îª%WINDIR%\Microsoft.Net\Framework\v2.0.50727\CONFIG
\Browsers¡£ÄãÒ²¿ÉÒÔÔÚÄãÓ¦ÓóÌÐòµÄApp_BrowsersÎļþ¼ÐÀïÌí¼Ó×Ô¶¨ÒåµÄÎļþ£¬¹ØÓÚÕâ·½ÃæµÄ¸ü¶àÐÅÏ¢£¬Çë²ÎÔÄÎÄÕ¡¶How To:
Detect Browser Types in ASP.NET Web Pages¡·
ÓÉÓÚĬÈÏʹÓõÄÊÇUseDeviceProfileÑ¡Ïî.µ±·ÃÎÊÕ¾µãµÄij¸ödevice²»Ö§
³Öcookiesʱ£¬¾ÍÕ¾µã¾ÍʹÓÃÎÞcookieµÄƱ¾Ý.
 
ÔÚURLÀï¶ÔƱ¾Ý½øÐбàÂë
µ±ä¯ÀÀÆ÷ÿ´ÎÏòij¸öÕ¾µã·¢³öÇëÇóʱ£¬ÓÃÀ´´æ´¢ÐÅÏ¢µÄÔØÌåͨ³£ÊÇCookies¡£µ«Èç¹û·ÃÎÊÕ¾
µãµÄdevice²»Ö§³ÖCookiesµÄ»°£¬ÎÒÃDZØÐëʹÓÃijÖÖ·½·¨ÔÚ¿Í»§¶ËºÍ·þÎñÆ÷¶Ë´«µÝƱ¾Ý£¬Í¨³£µÄ×ö·¨ÊÇÔÚURLÀォcookieÊý¾Ý±àÂë¡£
ΪÁ˽øÐÐÑÝʾ£¬ÎÒÃǽ«Ç¿ÆÈÕ¾µãʹÓÃÎÞcookieµÄƱ¾Ý£¬Îª´ËÎÒÃǽ«²ÉÓÃUseUri:
 
 
 
×öÁËÉÏÊöÐ޸ĺó£¬Í¨¹ýä¯ÀÀÆ÷·ÃÎÊ.µ±ÒÔÄäÃûÓû§½øÐзÃÎÊʱ£¬URL¿´ÆðÀ´ºÍÒÔǰûʲôÇø±ð£¬


Ïà¹ØÎĵµ£º

¶¨ÒåºÍʹÓÃASP.NET Profile(¸½Àý)

1¡¢Ë«»÷Ò»¸öÊý¾ÝÔ´¿Ø¼þ£¬½«Òª´æ´¢profileµÄÊý¾Ý¿â×÷ΪÊý¾ÝÔ´¼ÓÈë¿Ø¼þ£¨Õâ¸ö²½ÖèûʲôÓã¬Ö»ÊÇΪÁË·½±ã´ó¼ÒÓÿؼþ½¨Á¢Á¬½Ó£¬ÕâÑù²»ÈÝÒ׳ö´í£©£¬½¨Á¢ºÃÖ®ºó½«designÒ³ÃæµÄÊý¾ÝÔ´¿Ø¼þɾ³ý£¬Äã»á·¢ÏÖÔÚweb.configÀﻹÊÇÓÐÒ»ÌõÁ¬½ÓÓï¾ä£¬²»ÒªÉ¾³ý£¬ÎÒÃÇÏÂÃ潫Óõ½Ëü£¬È磺 <connectionStrings>
  <add ......

Asp.Net C#ÖÐSession ÈçºÎ´¢´æÈ¡ÐÅÏ¢

ÒòΪ¸Õ¸Õ½Ó´¥C#ÓïÑÔ²»¾Ã,ÓÚÊÇÎÒ°Ñ¿ØÖÆ̨¸øÈÓÁË,ÒòΪÎÒÌÖÑá¿ØÖÆ̨!
¶øÊÂʵÉÏÎÒÖ»¶ÔWinForm¼¼Êõ¸ÐÐËȤ,µ«ÊÂʵÉϵ½ÏÖÔÚÎÒ·¢ÏÖASP.Net C#µÄWeb¼¼ÊõÊÇÈÕÏÔÖØÒªÆðÀ´!
ÓÚÊÇ¿ªÊ¼½Ó´¥,¸Õ¸ÕÆð²½ÓÚËùÖª,ÓÈÆäÊÇһЩ×î¼òµ¥µÄ¶«Î÷,µ½ÍøÉÏËÑË÷Á˺ܾÃ,²»ÊÇÌ«ÂÒ¾ÍÊÇ˵²»Çå³þ!
¾Ù¸öÀý×ÓÀ´Ëµ,¾Í˵SessionºÃÁË,²»ÖªµÀÍøÉϵÄÄÇЩ¼Ò»ïµ½µ×ÔÚ½²Ê ......

asp.net ÏÂʵÏÖÎļþÉÏ´«½ø¶ÈÌõ£¨IHttpModule£©

±¾ÎĽ«Ì½ÌÖasp.netÏÂʵÏÖÎļþÉÏ´©½ø¶ÈÌõµÄ·½·¨¡£
Ò»°ãÇé¿öÏ£¬ÒªÊµÏÖÉÏ´«½ø¶ÈÌõÊ×ÏÈҪʵÏÖÉÏ´«Îļþ·Ö¿é¶ÁÈ¡£¬¶øĬÈÏÇé¿öÏ£¬iis½«Ö±½Ó°ÑÉÏ´«µÄÎļþÒ»´Î¶ÁÈëµ½ÄÚ´æÖУ¬ËùÒÔ±¾´¦µÄÄѵãÔÚÓÚÀ¹½ØiisµÄÎļþÉÏ´«¹ý³Ì£¬×ª¶ø×Ô¼ºµÄʵÏÖ·½Ê½¡£ËùÒÔ£¬ÎÒÃÇ¿ÉÒÔʵÏÖÒ»¸öIHttpModuleÀ´´¦ÀíÉÏ´«¹ý³Ì¡£¾ßÌåµÄ¹ý³ÌÊÇApplication_BeginReque ......

ASP.NET Mischellous

@Register : Register a user control or class with alias to this page.
@Import: Import a namespace.
@Reference: Link user controls or other page to complile current page. Ö§³ÖÊý¾Ý¿çÒ³ÃæµÄ´«ËÍ
Ò³Ãæʼþ£ºPreInit(´´½¨·þÎñÆ÷¿Ø¼þ), Init(³õʼ»¯·þÎñÆ÷¿Ø¼þµÄ״̬), InitComplete,PreLoad, Load, Lo ......

asp.net Òì²½Ò³Ãæ

Ç°¼¸ÌìÎÒûÊÂÔÚͼÊé¹Ý½è±¾··ºÙºÙ£¬Í¦ÓÐÒâ˼µÄ£¬ÁíÍâÄÇÌìÔÚÌù°É¿´µ½µÄÒ»²ÅÅ®µÄÎÊÌâͻȻÏëµ½ÁË··¾Í¿´ÁË¿´£¬Í¦ÓÐÒâ˼µÄ¡£
¾ßÌå×ܽáµÄÄÚÈÝÎÒ½ñÌìд³öÀ´£¬¿ÏÄÜÓе㳤£¬µ«ÊǶÔÍøÕ¾¾ø¶ÔÓÐÓá£
  Ò³ÃæµÄ´¦ÀíĬÈÏÇé¿öÏ£¬´¦ÀíASP¡£NETÒ³ÃæµÄÄ£Ðͱ¾ÖÊÉÏÊÇͬ²½µÄ¡£Õâ˵Ã÷£¬Ò³ÃæµÄÁ÷³ÌÊǹ̶¨µÄ£¬Ã¿Ò ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ