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

ASP.NET Session¶ªÊ§ÎÊÌâÔ­Òò¼°½â¾ö·½°¸

Õý³£²Ù×÷Çé¿öÏ»áÓÐASP.NET Session¶ªÊ§µÄÇé¿ö³öÏÖ¡£ÒòΪ³ÌÐòÊÇÔÚ²»Í£µÄ±»²Ù×÷£¬ÅųýSession³¬Ê±µÄ¿ÉÄÜ¡£ÁíÍ⣬Session³¬Ê±Ê±¼ä±»É趨³É60·ÖÖÓ£¬²»»áÕâô¿ì¾Í³¬Ê±µÄ¡£
ÏÖÔÚÎҾͰÑÔ­ÒòºÍ½â¾ö°ì·¨Ð´³öÀ´¡£
ASP.NET Session¶ªÊ§Ô­Òò£º
ÓÉÓÚAsp.net³ÌÐòÊÇĬÈÏÅäÖã¬ËùÒÔWeb.ConfigÎļþÖйØÓÚSessionµÄÉ趨ÈçÏ£º
< sessionState mode='InProc' stateConnectionString='tcpip=127.0.0.1:42424' sqlConnectionString='data source=127.0.0.1;Trusted_Connection=yes' cookieless='true' timeout='60'/>
ÎÒÃǻᷢÏÖsessionState±êÇ©ÖÐÓиöÊôÐÔmode£¬Ëü¿ÉÒÔÓÐ3ÖÖÈ¡Öµ£ºInProc¡¢StateServer?SQLServer£¨´óСдÃô¸Ð£© ¡£Ä¬ÈÏÇé¿öÏÂÊÇInProc£¬Ò²¾ÍÊǽ«Session±£´æÔÚ½ø³ÌÄÚ£¨IIS5ÊÇaspnet_wp.exe£¬¶øIIS6ÊÇW3wp.exe£©£¬Õâ¸ö½ø³Ì²»Îȶ¨£¬ÔÚijЩʼþ·¢Éúʱ£¬½ø³Ì»áÖØÆð£¬ËùÒÔÔì³ÉÁË´æ´¢Ôڸýø³ÌÄÚµÄSession¶ªÊ§¡£
ÄÄЩÇé¿öϸýø³Ì»áÖØÆðÄØ£¿Î¢ÈíµÄһƪÎÄÕ¸æËßÁËÎÒÃÇ£º
1¡¢ÅäÖÃÎļþÖÐprocessModel±êÇ©µÄmemoryLimitÊôÐÔ
2¡¢Global.asax»òÕßWeb.configÎļþ±»¸ü¸Ä
3¡¢BinÎļþ¼ÐÖеÄWeb³ÌÐò£¨DLL£©±»ÐÞ¸Ä
4¡¢É±¶¾Èí¼þɨÃèÁËһЩ.configÎļþ¡£
¸ü¶àµÄÐÅÏ¢Çë²Î¿¼PRB: Session variables are lost intermittently in ASP.NET applications
ASP.NET Session¶ªÊ§½â¾ö°ì·¨£º
Ç°Ãæ˵µ½µÄsessionState±êÇ©ÖÐmodeÊôÐÔ¿ÉÒÔÓÐÈý¸öÈ¡Öµ£¬³ýÁËInProcÖ®Í⣬»¹¿ÉÒÔΪStateServer¡¢SQLServer¡£ÕâÁ½ÖÖ´æSessionµÄ·½·¨¶¼Êǽø³ÌÍâµÄ£¬ËùÒÔµ±aspnet_wp.exeÖØÆðµÄʱºò£¬²»»áÓ°Ïìµ½Session¡£
ÏÖÔÚÇ뽫modeÉ趨ΪStateServer¡£StateServerÊDZ¾»úµÄÒ»¸ö·þÎñ£¬¿ÉÒÔÔÚϵͳ·þÎñÀï¿´µ½·þÎñÃûΪASP.NET State ServiceµÄ·þÎñ£¬Ä¬ÈÏÇé¿öÊDz»Æô¶¯µÄ¡£µ±ÎÒÃÇÉ趨modeΪStateServerÖ®ºó£¬ÇëÊÖ¹¤½«¸Ã·þÎñÆô¶¯¡£
ÕâÑù£¬ÎÒÃǾÍÄÜÀûÓñ¾»úµÄStateServiceÀ´´æ´¢SessionÁË£¬³ý·ÇµçÄÔÖØÆô»òÕßStateService±Àµô£¬·ñÔòSessionÊDz»»á¶ªµÄ£¨ÒòSession³¬Ê±±»¶ªÆúÊÇÕý³£µÄ£©¡£
³ý´ËÖ®Í⣬ÎÒÃÇ»¹¿ÉÒÔ½«Sessionͨ¹ýÆäËûµçÄÔµÄStateServiceÀ´±£´æ¡£¾ßÌåµÄÐÞ¸ÄÊÇÕâÑùµÄ¡£Í¬Ñù»¹ÔÚsessionState±êÇ©ÖУ¬ÓиöstateConnectionString='tcpip=127.0.0.1:42424'ÊôÐÔ£¬ÆäÖÐÓиöipµØÖ·£¬Ä¬ÈÏΪ±¾»ú£¨127.0.0.1£©£¬Äã¿ÉÒÔ½«Æä¸Ä³ÉÄãËùÖªµÄÔËÐÐÁËStateService·þÎñµÄµçÄÔIP£¬ÕâÑù¾Í¿ÉÒÔʵÏÖλÓÚ²»Í¬µçÄÔÉϵÄAsp.net³ÌÐò»¥Í¨SessionÁË¡£
Èç¹ûÄãÓиü¸ßµÄÒªÇó£¬ÐèÒªÔÚ·þÎñÆÚÖØÆôʱSessionÒ²²»¶ªÊ§£¬¿ÉÒÔ¿¼Âǽ«modeÉ


Ïà¹ØÎĵµ£º

asp.net wap 2.0 ʵÏÖ ishtml32 Ï ¼ÓÔØ cssÎļþ

ʹÓÃasp.net ¿ª·¢wap ÍøÕ¾£¬ÔÚishtml32Ï£¬Èç¹ûÊÖ»úä¯ÀÀÆ÷Ö§³Öishtml32,µ«ÊÇ SupportsCss=False ʱ£¬Ïë¼ÓÔØcssÎļþʱ£¬²ÉÓÃÖØдmobile:formµÄ·½·¨À´ÊµÏÖ
using System;
using System.Configuration;
using System.Web.UI.MobileControls;
using System.Web.UI.MobileControls.Adapters;
public class MyForm : Form
{ ......

ASP.NetÖÐMD5ºÍSHA1¼ÓÃܵļ¸ÖÖ·½·¨

Ê×Ïȼòµ¥½éÉÜÒ»ÏÂMD5ºÍSHA1:
MD5µÄÈ«³ÆÊÇMessage-Digest Algorithm 5£¨ÐÅÏ¢-ÕªÒªËã·¨£©£¬ÔÚ90Äê´ú³õÓÉMit Laboratory for Computer ScienceºÍRsa data security incµÄRonald l. rivest¿ª·¢³öÀ´£¬¾­md2¡¢md3ºÍmd4·¢Õ¹¶øÀ´¡£ËüµÄ×÷ÓÃÊÇÈôóÈÝÁ¿ÐÅÏ¢ÔÚÓÃÊý×ÖÇ©ÃûÈí¼þÇ©Êð˽ÈËÃܳ×Ç°±»"ѹËõ"³ÉÒ»ÖÖ±£Ãܵĸñʽ£¨¾ÍÊÇ°ÑÒ»¸öÈÎÒâ³ ......

asp.netÌøתҳÃæµÄÈýÖÖ·½·¨±È½Ï

1¡¢ response.redirect Õâ¸öÌøתҳÃæµÄ·½·¨ÌøתµÄËٶȲ»¿ì£¬ÒòΪËüÒª×ß2¸öÀ´»Ø(2´Îpostback)£¬µ«Ëû¿ÉÒÔÌø תµ½ÈκÎÒ³Ã棬ûÓÐÕ¾µãÒ³ÃæÏÞÖÆ(¼´¿ÉÒÔÓÉÑÅ»¢Ìøµ½ÐÂÀË)£¬Í¬Ê±²»ÄÜÌø¹ýµÇ¼±£»¤¡£µ«ËÙ¶ÈÂýÊÇÆä×î´óȱÏÝ!redirectÌøת»úÖÆ£ºÊ×ÏÈÊÇ·¢ËÍÒ»¸öhttpÇëÇ󵽿ͻ§¶Ë£¬Í¨ÖªÐèÒªÌøתµ½ÐÂÒ³Ã棬Ȼºó¿Í»§¶ËÔÚ·¢ËÍÌøתÇëÇóµ½·þÎñÆ÷ ......

Asp.net ²Ù×÷webclientÉÏ´«ÎļþÎÞ·¨ÉÏ´«µÄ½â¾ö·½°¸

ÒòΪÏîÄ¿ÖÐҪʹÓÃajaxÉÏ´«Í¼Æ¬Îļþ£¬ÓÖÎÞ·¨ÕÒµ½ºÏÊʵÄjquery²å¼þ£¬Ö»ÓÐ×Ô¼º¶¯ÊÖдһ¸ö¡£Ë¼Â·ÈçÏ£º
1.ÓÃjsÈ¡µÃÎļþµÄÍêȫ·¾¶
2.ajax´«µ½ºǫ́
3.ʹÓÃwebclientµÄuploadfileÉÏ´«Îļþ¡£
Ò»ÇÐÊÓºõûÓÐÎÊÌâÁË£¬µ«ÊÇʵ¼Ê¿ª·¢ÖУ¬±¾»ú²âÊÔûÓÐÈκÎÎÊÌ⣬µ«ÊDz¿ÊðºóÈ´×ÜÊÇÕÒ²»µ½ÉÏ´«µÄÎļþ£¬µ÷ÊÔ´úÂëºó·¢ÏÖÎÞ·¨·ÃÎÊ¿Í»§¶Ë·¾¶µ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ