ASP.Net³¬Ê±Ê±¼ä
½â¾ö°ì·¨
1.ÔÚ´úÂëÀïÃæ,°Ñδ¹Ø±ÕµÄÁ¬½Ó¹Ø±Õ
2.À©´ó¹²Ïí³Ø,·½·¨ÈçÏÂ:
½â¾ö·½·¨¿ÉÒÔÊÇÐÞ¸ÄÁ¬½Ó³ØµÄÁ¬½ÓÉú´æÆÚ,ÒòΪĬÈÏÖµÊÇ60Ãë,¼´Á¬½Ó´ÓÓ¦ÓóÌÐò±»Êͷźó¿ÉÒÔÔÚ³ØÖб£´æµÄʱ¼ä¡£
¾ßÌå²Ù×÷²½ÖèÈçÏ£º
Èç¹ûÊÇODBCµÄ»°£¬Ôò¿ÉÒÔÔÚODBC Data Source AdministratorÖÐÊÖ¶¯¸ü¸Ä£¬¸Ã³ÌÐòλÓÚ“Start”²Ëµ¥ÖеēPrograms”->"Adminstrative Tools"£¨ÖÐÎÄÃû£º¹ÜÀí¹¤¾ß£©Ï£¬»ò´Ó"Control Panel"(ÖÐÎÄÃû£º¿ØÖÆÃæ°å)Öдò¿ª“ODBC Data Source Administrator”£¨ODBCÊý¾ÝÔ´¹ÜÀíÆ÷£©£¬ÔÙÑ¡Ôñ“Connection Pooling”£¨Á¬½Ó³Ø£©Ñ¡Ï£¬Ë«»÷Çý¶¯³ÌÐòÖеēSQL Server”£¬Ñ¡Ôñ“Pool Connetions to this drive”(ʹÓóØÁ¬½Ó¸ÃÇý¶¯³ÌÐò)£¬°ÑÏÂÃæµÄʱ¼ä60Ãë¸ÄµÄ´óÒ»µã£¬ÀýÈç120¡£
Èç¹ûÊÇSqlConnectionµÄ¹²ÏíÁ¬½Ó£¬ÔòΪConnectionStringÊôÐÔConnection LifetimeÊýÖµÃû³ÆÖ¸¶¨Ò»¸öÖµ£¬¸ÃֵĬÈÏÇé¿öÏÂÊÇ0£¬±íʾÁ¬½ÓÓÀÔ¶²»»á´Ó³ØÖб»×Ô¶¯ÒÆ×ß¡£Èç¹ûÖ¸¶¨Ò»¸ö²»Í¬µÄÖµ£¬ÄÇôһµ©Á¬½Ó±»·µ»Øµ½³ØÖУ¬¸ÃÖµ½«ºÍÁ¬½ÓµÄ´´½¨Ê±¼ä¼°µ±Ç°Ê±¼ä½øÐбȽϡ£Èç¹ûÉú´æÆÚ³¬¹ýÁËConnection LifetimeµÄÖµ£¬ÄÇôÁ¬½Ó½«´Ó³ØÖб»ÒÆ×ß¡£
ÎÊÌâµÄÔÒòÊÇÓëÊý¾Ý¿âµÄÁ¬½ÓûÓÐÏÔʾ¹Ø±Õ,¶øµÈϵͳ×Ô¶¯»ØÊÕÊÇҪʱ¼äµÄ.½â¾öµÄ·½·¨ÊǸıäÁ¬½Ó³ØµÄ´óС.ÔÚÁ¬½Ó×Ö·û´®µÄºóÃæ¼ÓÉÏÒÔÏ´úÂë:Enlist=true;Pooling=true;Max Pool Size=300;Min Pool Size=0;Connection Lifetime=300;user id=sa;packet size=1000
packet size²ÎÊýÈ¡512µ½32767ÖеÄÈÎÒ»ÕûÊýÖµ
·½·¨ÓÐÒÔÏÂÁ½ÖÖ:
1,ÔÚweb.configÖмÓÉÏÒÔÏÂÓï¾ä:
<system.web>
<httpRuntime maxRequestLength="102400" executionTimeout="720" />
</system.web>
À´×ÔMSDN½âÊÍ£º
httpRuntimeÊÇÅäÖÃasp.Net httpÔËÐÐʱÉèÖã¬ÒÔÈ·¶¨ÈçºÎ´¦Àí¶Ôasp.NetÓ¦ÓóÌÐòµÄÇëÇó¡£
executionTimeout:±íʾÔÊÐíÖ´ÐÐÇëÇóµÄ×î´óʱ¼äÏÞÖÆ£¬µ¥Î»ÎªÃë
maxRequestLength£ºÖ¸Ê¾ ASP.Net Ö§³ÖµÄ×î´óÎļþÉÏÔØ´óС¡£¸ÃÏÞÖÆ¿ÉÓÃÓÚ·ÀÖ¹ÒòÓû§½«´óÁ¿Îļþ´«µÝµ½¸Ã·þÎñÆ÷¶øµ¼Öµľܾø·þÎñ¹¥»÷¡£Ö¸¶¨µÄ´óСÒÔ KB Ϊµ¥Î»¡£Ä¬ÈÏֵΪ 4096 KB (4 MB)¡£
useFullyQualifiedRedirectUrl£º±íʾָʾ¿Í»§¶ËÖض¨ÏòÊÇ·ñÊÇÍêÈ«ÏÞ¶¨µÄ£¨²ÉÓà "http://server/path" ¸ñʽ£¬ÕâÊÇijЩÒƶ¯¿Ø¼þËù±ØÐèµÄ
Ïà¹ØÎĵµ£º
1£¬±¾µØÉú³ÉµÄÎļþÏòIIS¹«¿ªµÄ·¾¶Öи´ÖÆ£¬ÓÐʱ»á·¢Éú°²È«´íÎó£¬ÕâÊÇÒòΪĿ±êÎļþ¼ÐÏ£¬Ã»ÓÐȨÏÞ£¬¿ÉÒÔ¿¼ÂÇÉèÖÃEveryoneȨÏÞ,µ«Çë½÷É÷ʹÓá£
2£¬LoadÒ³ÃæµÄʱºòÈç¹û·¢Éú “ûÓÐÕÒµ½Îļþ”ÕâÑùµÄ´íÎ󣬾ÍÐèÒª²é¿´ÄãдÈëǰ̨µÄ¸÷¸öÎļþ·¾¶ÊÇ·ñÕýÈ·£¬°üÀ¨Í¼Æ¬£¬CSSÎļþ£¬jsÎļþµÈµÈ¡£
3£¬ASP ÔÚLoadÒ³ÃæµÄ¹ý³Ì£¬Ê ......
Asp.NetÏÂÔØ·½·¨¡¡²Î¿¼
(1) Ê×ÏÈ×ö³ÉÏÂÔØÎļþ¡£
¡£¡£¡£ ¡£¡£¡£
(2) ×ö³ÉÏÂÔØÎļþµÄ·¾¶ÒÔ¼°ÎļþÃûÓÃsession´«µÝ¸ø´ò¿ªÒ³Ãæ
Session["FILE_PATH"] = ·¾¶ + "DownLoadFile.txt";
Session["FILE_NAME"] = "DownLoadFile.txt";
(3) ´ò¿ªÐ ......
[תÔØ]ÈçºÎ´ò¿ª±ðÈ˵ÄASP.netÏîÄ¿
ÈçºÎ´ò¿ª±ðÈ˵ÄASP.netÏîÄ¿2006-2-24 21:51:00
£¨1£©½«ÏîÄ¿Îļþ¼Ð¿½±´µ½Äã»úÆ÷µÄwwwrootĿ¼
£¨2£©ÔÚIIS½¨Á¢Ò»¸öÃû³ÆΪWebApplicationµÄÐéÄâĿ¼£¬Ö÷Ŀ¼É趨Ϊ C:\Inetpub\wwwroot ......
1. ¼òÊö private¡¢ protected¡¢ public¡¢ internal ÐÞÊηûµÄ·ÃÎÊȨÏÞ¡£
´ð . private : ˽ÓгÉÔ±, ÔÚÀàµÄÄÚ²¿²Å¿ÉÒÔ·ÃÎÊ¡£
protected : ±£»¤³ÉÔ±£¬¸ÃÀàÄÚ²¿ºÍ¼Ì³ÐÀàÖпÉÒÔ·ÃÎÊ¡£
public : ¹«¹²³ÉÔ±£¬ÍêÈ«¹«¿ª£¬Ã»ÓзÃÎÊÏÞÖÆ¡£
internal: ÔÚͬһÃüÃû¿Õ¼äÄÚ¿ÉÒÔ·ÃÎÊ¡£
2 .ÁоÙASP.NET Ò³ÃæÖ®¼ä´«µÝÖµµÄ¼¸ÖÖ·½ ......