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Öе¼³öExeclµÄ·½·¨£º ÔÚ asp.netÖе¼³öExeclÓÐÁ½ÖÖ·½·¨£¬Ò»ÖÖÊǽ«µ¼³öµÄÎļþ´æ·ÅÔÚ·þÎñÆ÷ij¸öÎļþ¼ÐÏÂÃæ£¬È»ºó½«ÎļþµØÖ· Êä³öÔÚä¯ÀÀÆ÷ÉÏ£»Ò»ÖÖÊǽ«ÎļþÖ±½Ó½«ÎļþÊä³öÁ÷д¸øä¯ÀÀÆ÷¡£ÔÚResponseÊä³öʱ£¬\t·Ö¸ôµÄÊý¾Ý£¬µ¼³ö execlʱ£¬µÈ¼ÛÓÚ·ÖÁУ¬\nµÈ¼ÛÓÚ»»
Ò»¡¢asp.netÖе¼³öExeclµÄ·½·¨£º
ÔÚ asp.netÖе¼³öE ......
Ò»¡¢ÈÏʶWeb.configÎļþ
Web.configÎļþÊÇÒ»¸öXMLÎı¾Îļþ£¬ËüÓÃÀ´´¢´æ ASP.NET Web Ó¦ÓóÌÐòµÄÅäÖÃÐÅÏ¢£¨Èç×î³£ÓõÄÉèÖÃASP.NET Web Ó¦ÓóÌÐòµÄÉí·ÝÑéÖ¤·½Ê½£©£¬Ëü¿ÉÒÔ³öÏÖÔÚÓ¦ÓóÌÐòµÄÿһ¸öĿ¼ÖС£µ±Äãͨ¹ýVB.NETн¨Ò»¸öWebÓ¦ÓóÌÐòºó£¬Ä¬ÈÏÇé¿öÏ»áÔÚ¸ùĿ¼×Ô¶¯´´½¨Ò»¸öĬÈϵÄWeb.configÎļþ£¬°üÀ¨Ä¬ÈϵÄÅäÖÃÉèÖã¬Ë ......
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 ......
ÎÒÃÇÔÚÊ״β¿ÊðmvcµÄÏîĿʱͨ³£»áÓöµ½Ò»µãÎÊÌâ¡£M$ÒѾÔÚGlobal.asax.csÎļþÖаüº¬ÁËÕâÁ½¾ä×¢Ê͵ÄÌáʾ¡£
// Note: For instructions on enabling IIS6 or IIS7 classic mode,
// visit http://go.microsoft.com/?LinkId=9394801
µ«ÊÇÎÒÃÇ·ÃÎÊÕâ¸öÍøÖ·¿´µ½ÉÏÃæµÄÎÄÕ¶Ôiis5.1(win ......
ScriptManager.RegisterStartupScript(p1, this.GetType(), "click", "alert('ok')", true);//p1ÊÇupdatepanelµÄid
ScriptManager.RegisterStartupScript(p1, this.GetType(), "click", "alert('ok')", true);//p1ÊÇupdatepanelµÄid
......