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

ASP.NET ״̬·þÎñ ¼° session¶ªÊ§ÎÊÌâ½â¾ö·½°¸×ܽá

 
asp.net SessionµÄʵÏÖ£º
asp.netµÄSessionÊÇ»ùÓÚHttpModule¼¼Êõ×öµÄ£¬HttpModule¿ÉÒÔÔÚÇëÇó±»´¦Àí֮ǰ£¬¶ÔÇëÇó½øÐÐ״̬¿ØÖÆ£¬ÓÉÓÚSession±¾Éí¾ÍÊÇÓÃÀ´×ö״̬ά»¤µÄ£¬Òò´ËÓÃHttpModule×öSessionÊÇÔÙºÏÊʲ»¹ýÁË¡£
ASP.NETÖÐSessionµÄ״̬±£³Ö·½Ê½
ASP.NETÌṩÁËSession¶ÔÏ󣬴ӶøÔÊÐí³ÌÐòԱʶ±ð¡¢´æ´¢ºÍ´¦Àíͬһ¸öä¯ÀÀÆ÷¶ÔÏó¶Ô·þÎñÆ÷ÉÏij¸öÌض¨ÍøÂçÓ¦ÓóÌÐòµÄÈô¸É´ÎÇëÇóµÄÉÏÏÂÎÄÐÅÏ¢¡£Session¶ÔÓ¦ä¯ÀÀÆ÷Óë·þÎñÆ÷µÄͬһ´Î¶Ô»°£¬ÔÚä¯ÀÀÆ÷µÚÒ»ÇëÇóÍøÂçÓ¦ÓóÌÐòµÄij¸öÒ³Ãæʱ£¬·þÎñÆ÷»á´¥·¢Session_onStartʼþ£»ÔÚ¶Ô»°³¬Ê±»òÕß±»¹Ø±ÕµÄʱºò»á´¥·¢Session_onEnd ʼþ¡£³ÌÐòÔ±¿ÉÒÔÔÚ´úÂëÖÐÏìÓ¦ÕâÁ½¸öʼþÀ´´¦ÀíÓëͬһ´Î¶Ô»°Ïà¹ØµÄÈÎÎñ£¬È翪±ÙºÍÊͷŸôζԻ°ÒªÊ¹ÓõÄ×ÊÔ´µÈ¡£
   ÔÚASP.NETµÄ³ÌÐòÖÐҪʹÓÃSession¶ÔÏóʱ£¬±ØÐëÈ·±£Ò³ÃæµÄ@pageÖ¸ÁîÖÐEnableSessionStateÊôÐÔÊÇTrue»òÕßReadonly£¬²¢ÇÒÔÚweb.configÎļþÖÐÕýÈ·µÄÉèÖÃÁËSessionStateÊôÐÔ¡£
ASP.NETÖÐSessionµÄ״̬±£³ÖÊÇÓÉweb.configÎļþÖеÄ<system.web>±ê¼ÇϵÄ<sessionstate>±ê¼ÇµÄmodeÊôÐÔÀ´¾ö¶¨µÄ¡£¸ÃÊôÐÔÓÐËÄÖÖ¿ÉÄܵÄÖµ£ºOff¡¢Inproc¡¢StateServerºÍSQlServer.
ÉèΪOff»á½ûÓÃSession.
InprocÊÇȱʡµÄÉèÖÃ,ÕâÖÖģʽºÍÒÔÇ°µÄASPµÄ»á»°×´Ì¬µÄ·½·¨ÊÇÀàËƵÄ,»á»°µÄ״̬»á±»±£´æÔÚASP.NET½ø³ÌÖУ¬ËüµÄÓŵãÊÇÏÔ¶øÒ×¼ûµÄ£ºÐÔÄÜ¡£½ø³ÌÄÚµÄÊý¾Ý·ÃÎÊ×ÔÈ»»á±È¿ä½ø³ÌµÄ·ÃÎʿ졣Ȼ¶ø£¬ÕâÖÖ·½·¨SessionµÄ״̬ÒÀÀµÓÚASP.NET½ø³Ì£¬µ±IIS½ø³Ì±ÀÀ£»òÕßÕý³£ÖØÆðÆôʱ£¬±£´æÔÚ½ø³ÌÖеÄ״̬½«¶ªÊ§¡£
ΪÁË¿Ë·þInprocģʽµÄȱµã£¬ASP.NETÌṩÁËÁ½ÖÖ½ø³ÌÍâ±£³Ö»á»°×´Ì¬µÄ·½·¨¡£
ASP.NETÊ×ÏÈÌṩÁËÌṩÁËÒ»¸öWindows·þÎñ£ºASPState,Õâ¸ö·þÎñÆô¶¯ºó£¬ASP.NETÓ¦ÓóÌÐò¿ÉÒÔ½«modeÊôÐÔÉèÖÃΪ“SateServer”,À´Ê¹ÓÃÕâ¸öWindows·þÎñÌṩµÄ״̬¹ÜÀí·½·¨¡£
³ýÁËÔÚweb.configÎļþÖÐÉèÖÃmodeÊôÐÔΪStateServerÍ⣬»¹±ØÐëÉèÖÃÔËÐÐStateServer·þÎñÆ÷µÄIPµØÖ·ºÍ¶Ë¿ÚºÅ.Èç¹ûÔÚIISËùÔڵĻúÆ÷ÔËÐÐStateServerÔòIPµØÖ·¾ÍÊÇ127.0.0.1,¶Ë¿ÚºÅͨ³£ÊÇ42424.ÅäÖÃÈçÏ£º
mode=”StateServer”
stateConnectionString="tcpip=127.0.0.1:42424"
    ʹÓÃÕâÖÖģʽ,»á»°×´Ì¬µÄ´æ´¢½«²»ÒÀÀµIIS½ø³ÌµÄʧ°Ü»òÕßÖØÆô,»á»°µÄ״̬½«´æ´¢ÔÚStateServer½ø³ÌµÄÄÚ´æ¿Õ¼äÖС£
   ÁíÒ»ÖֻỰ״̬ģʽÊÇSQLServerģʽ¡£ÕâÖÖģʽÊǽ«»á»°µÄ״̬±£´æÔÚSQL ServerÊý¾Ý¿âÖÐ


Ïà¹ØÎĵµ£º

asp.net¹¤×÷Ô­Àí


ASP.NETµÄÒ³Ãæ³õʼ»¯ÓëʼþÏê½â
 
Ò»¡¢³õʼ»¯
¡¡¡¡·µ±Ò³Ãæ±»Ìá½»ÇëÇóµÚÒ»¸ö·½·¨ÓÀÔ¶Êǹ¹Ô캯Êý¡£Äú¿ÉÒÔÔÚ¹¹Ô캯ÊýÀïÃæ³õʼһЩ×Ô¶¨ÒåÊôÐÔ»ò¶ÔÏ󣬲»¹ýÕâʱºòÒòΪҳÃ滹ûÓб»ÍêÈ«³õʼ»¯ËùÒÔ¶àÉÙ»áÓÐЩÏÞÖÆ¡£ÌرðµØ£¬ÄúÐèҪʹÓÃHttpContext¶ÔÏó¡£µ±Ç°¿ÉÒÔʹÓõĶÔÏó°üÀ¨QueryString, FormÒÔ¼°Cookies¼¯ºÏ£ ......

tempÎļþ¼ÐȨÏÞ¶ÔASPÍøÕ¾ÒÔ¼°ASP.NETÍøÕ¾µÄÓ°Ïì

 ×öÍøÕ¾Óë¸ã°²È«Ò»°ã¶¼Àë²»¿ªÈ¨ÏÞ·ÖÅä,ÍøվȨÏÞÒ»°ã¶¼Ö±½ÓÉèÖÃÕ¾µãËùÔÚµÄÐéÄâĿ¼µÄ,Ò²¾ÍÊÇÔÚÐéÄâĿ¼µÄ°²È«ÀïÌí¼ÓinternetÀ´±öÕË»§,²¢·ÖÅä³ýÍêÈ«¿ØÖÆÍâµÄËùÓÐȨÏÞ;Èç¹ûÊÇ.NET,»¹±ØÐë¸øASP.NETÓû§ÅäÖóýÍêÈ«¿ØÖÆÒÔÍâµÄȨÏÞ! 
Ò»°ãÇé¿öÏÂ,ÕâÑù¾ÍOKÁË,·þÎñÆ÷ÉϵÄÒ»°ãÍøÕ¾¶¼¿ÉÒÔÕý³£ÔËÐÐÁË!µ«ÏÖÔÚÎÒ·¢ÏÖ:C\WINDOWS ......

windows 7 ÏÂASP.net ±¾µØÅäÖà ( IIS 7)

 ½ñÌìµ÷ÊÔblend 3µÄÒ»¸öZune3DÑùÀýʱ, ÔËÐкóÉú³ÉµÄÊÇsliverlight³ÌÐò, ÓÉÓÚÎҵĻúÆ÷ÊǸմÓvistaÉý¼¶µ½windows 7, iis¶¼Ã»ÓÐÅäÖÃ, Òò´ËÎÞ·¨Ô¤ÀÀ.ÏÖ¸ø³ö²½Öè:
(Ò». ÅäÖÃIIS)
1. ´ò¿ª"Control Panel" / "Programs" / "Turn Windows features on or off",  ¹´Ñ¡"Internet Information Services", windows 7ĬÈϹ´Ñ ......

Building a Web 2.0 Portal with asp.net ajax µÚÒ»ÕÂ


[Òë]µÚÒ»Õ ½éÉÜ Web ÃÅ»§ÒÔ¼° Dropthings.com
ÔÚÕâ±¾ÊéÖУ¬ÎÒ½«»á¸øÄúչʾÔõÑù½éÉÜÒ»¸ö Ajax£¬Web 2.0 ʽµÄÃÅ»§¡£Õâ¸öÃÅ»§Ê¹Óà ASP.NET 3.5 , ASP.NET AJAX ºÍ .NET 3.5 , ҲʹÓÃÁË LINQ ºÍ SQL Server 2005.ÔÚ´´½¨Ó¦ÓóÌÐòÖУ¬Äã¿ÉÒÔÁ˽⵽£º
±ØÐëÒª×öµÄÉè¼Æ¾ö¶¨ºÍ Web 2.0 Óû§½çÃæÖпÉÓÃÐÔµÄÎÊÌâ
¼Ü¹¹µÄ¸´ÔÓÐԺͷ ......

ASP.NET°²È«ÈÏÖ¤ ËÄ

——ÇÉÃîʵÏÖ Form ±íµ¥ÈÏÖ¤¿çÕ¾µã¡¢¿ç·þÎñÆ÷µÄµ¥µãµÇ¼£¨Single Sign On£©
×÷Õߣºº®Óð·ã(cityhunter172)
µÚËIJ¿·Ö Form ÈÏÖ¤µÄ²¹³ä
Ç°ÈýƪÔÚ CSDN ÂÛ̳¹«²¼ºó£¬Ð§¹ûÈçͬ“ÉñÏÉ·Åƨ——¹ûÈ»²»Í¬·²£¨·´£©Ï씡£Îª¸Ðл¹ã´óÍøÓѵÄÈÈÇéÓëÖ§³Ö£¬Õâ²»£¬¾­¹ýÕâÒ»Õó×ÓµÄÔÍÄð¡¢ÐÞÁ¶£¬ÌØÒâ×¼±¸ÁËÕâµ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ