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

ASP.Net ÎļþÉÏ´«´óСÏÞÖÆ½â¾ö·½°¸ÐÞ¸ÄIIS7/7.5ÅäÖÃ

IIS 7 ĬÈÏÎļþÉÏ´«´óСʱ30M
ÒªÍ»ÆÆÕâ¸öÏÞÖÆ£º
1. ÐÞ¸ÄIISµÄapplicationhost.config
    ´ò¿ª %windir%\system32\inetsrv\config\applicationhost.config
     ÕÒµ½£º <requestFiltering>½Úµã£¬
  Õâ¸ö½ÚµãĬÈÏûÓÐ <requestLimits maxAllowedContentLength="ÉÏ´«´óСµÄÖµ(µ¥Î»£ºbyte)" /> ÔªËØ£¬IIS 7ºÍIIS 7.5ÉϲâÊÔ¹ý  ×î´óÖµÖ»ÄÜÊÇ<requestLimits maxAllowedContentLength="4294967295" />  <4GB,
     ΪÕâ¸ö½ÚµãÐÂÔöÈçÏÂÊÂÀýÔªËØ£º<requestLimits maxAllowedContentLength="2147483647" /> £¬ÉÏ´«µÄ´óС½«¸ÄΪ2G
×¢Ò⣺ %windir%\system32\inetsrv\config\applicationhost.config ÎļþÒ»¶¨²»ÒªÓÃÆäËû»úÆ÷µÄÎļþÌæ»»£¬·ñÔòIIS½«ÎÞ·¨Æô¶¯
´ËÎļþ¼Ç¼ÁË£¬µ±Ç°IISÖÐËùÓÐSite , App poolµÄÐÅÏ¢£¬»¹ÓÐһЩÓë»úÆ÷Ïà¹ØµÄÅäÖá£
2 ÐÞ¸Äweb.config
<system.web>
     <httpRuntime executionTimeout="36000" maxRequestLength="2097151"/>   <!--maxRequestLength£ºÉÏ´«µÄ´óС£¬µ¥Î»K   ,executionTimeout£ºÉèÖó¬Ê±Ê±¼ä£¬µ¥Î»£ºÃë¡££¨Ä¬ÈÏÊÇ90Ã룩 -->
</system.web>
×¢Ò⣺Õâ¸ömaxRequestLength×î´óÖµÖ»ÄÜÊÇ2097151K,ÉèÖôóÓÚÕâ¸öÖµ½«»á³öÏÖÈçÏ´íÎó:
 
Configuration Error
Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately.
Parser Error Message: The value for the property 'maxRequestLength' is not valid. The error is: The value must be inside the range 0-2097151.
Source Error:
<httpHandlers />
<customErrors mode="RemoteOnly" />
<httpRuntime executionTimeout="36000" maxRequestLength="4194304" />
<authentication mode="Windows" />
<identity impersonate="true" />
 
3.  web.configÏÂÈç¹ûÓÐÈçϽڵã(´Ë½ÚµãÊÇΪIIS 7Éè¼ÆµÄ) £¬ÔòÐÞ¸Ä
<requestLimits maxAllowedContentLength="2147483647" /> µ¥Î»Óëapplicationhost.configÖеÄ<requestLimits maxAllowedContentLength="2147483647" /&


Ïà¹ØÎĵµ£º

asp.netÈÕÆÚʱ¼äº¯Êý¸ñʽ

//»ñÈ¡ÈÕÆÚ+ʱ¼ä
DateTime.Now.ToString();            // 2008-9-4 20:02:10
DateTime.Now.ToLocalTime().ToString();        // 2008-9-4 20:12:12
//»ñÈ¡ÈÕÆÚ
DateTime.Now.ToLongDateString().ToString();    // 2008Äê9ÔÂ4ÈÕ
D ......

asp.netÖе¼³öExeclµÄ·½·¨

Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º ÔÚ asp.netÖе¼³öExeclÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊǽ«µ¼³öµÄÎļþ´æ·ÅÔÚ·þÎñÆ÷ij¸öÎļþ¼ÐÏÂÃæ£¬È»ºó½«ÎļþµØÖ· Êä³öÔÚä¯ÀÀÆ÷ÉÏ£»Ò»ÖÖÊǽ«ÎļþÖ±½Ó½«ÎļþÊä³öÁ÷д¸øä¯ÀÀÆ÷¡£ÔÚResponseÊä³öʱ£¬\t·Ö¸ôµÄÊý¾Ý£¬µ¼³ö execlʱ£¬µÈ¼ÛÓÚ·ÖÁУ¬\nµÈ¼ÛÓÚ»»
Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º
ÔÚ asp.netÖе¼³öE ......

ÔÚasp.netÖÐʹÓÃsession³£¼ûÎÊÌ⼯½õ

ÎÊ£ºÎªÊ²Ã´sessionÔÚÓÐЩ»úÆ÷ÉÏż¶û»á¶ªÊ§£¿  
´ð£º¿ÉÄܺͻúÆ÷µÄ»·¾³ÓйØÏµ£¬±ÈÈ磺·À»ðǽ»òÕßɱ¶¾Èí¼þµÈ£¬³¢ÊԹرշÀ»ðǽ¡£  
ÎÊ£ºÎªÊ²Ã´µ±µ÷ÓÃsession.abandonʱ²¢Ã»Óм¤·¢session_end·½·¨£¿  
´ð£ºÊ×ÏÈsession_end·½·¨Ö»Ö§³Öinproc£¨½ø³ÌÄڵģ©ÀàÐ͵Äsession¡£Æä´ÎÒª¼¤·¢session_en ......

asp.netÓÒ¼üµ¯³öÉÏÏÂÎIJ˵¥

xtreeView.js
---==========================================================
var ie5=document.all&&document.getElementById
var ns6=document.getElementById&&!document.all
if (ie5||ns6)
var menuobj=document.getElementById("Panel2")
function showmenuie5(e)
{
   
&n ......

asp.net×¢²áJavascriptµÄ·½·¨

1¡¢IsStartupScriptRegistered£º¶ÔÏóÊÇ·ñ×¢²áÁËÆôÓýű¾¡£
2¡¢IsClientScriptBlockRegistered£º¶ÔÏóÊÇ·ñ×¢²áÁ˿ͻ§¶Ë½Å±¾¿é¡£
3¡¢IsClientScriptIncludeRegistered£º¶ÔÏóÊÇ·ñ×¢²áÁ˿ͻ§¶Ë½Å±¾°üº¬¡£
µÚÒ»¸öÀý×Ó£º
string info = "<script>alert('ÄãºÃÂð£¿');</script>";
//ÅжÏʼþÊÇ·ñ±»×¢²á£¬Ð´ÈëÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØÍ¼ | ¸ÓICP±¸09004571ºÅ