bsso

 

php.ini

post_max_size = 1024M

upload_max_filesize = 1024M

max_execution_time = 600

max_input_time = 600 

memory_limit = 256M

 

Windows7 IIS 500 – 内部服务器错误解决方案

1、解决方法:打开IIS,在功能视图中找到“错误页”,双击进去后,看最右边的“操作”下的“编辑功能设置…”,将“错误响应”下的“详细错误”勾上。

2、打开控制面板→管理工具→Internet 信息服务(IIS)管理器→双击“ASP”图标,然后在右边的窗口中展开“调试属性”,把“将错误发送到浏览器”设为True即可。微软基于安全性考虑不将错误信息发送给浏览器,记得在网站正式发布时,还原此项设置。

3、本地浏览器去掉了“显示http友好错误提示”选项,显示:php-cgi.exe - FastCGI 进程超过了配置的活动超时时限

4、解决办法:IIS7->FastCGI设置->双击"php-cgi.exe"->"活动超时" 项默认是设置为70(秒),改为600(10分钟,此处根据需求设置可以略高~)

 

 

 

 

IS 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:
Line 117: <httpHandlers />
Line 118: <customErrors mode="RemoteOnly" />
Line 119: <httpRuntime executionTimeout="36000" maxRequestLength="4194304" />
Line 120: <authentication mode="Windows" />
Line 121: <identity impersonate="true" />
复制代码

3.  web.config下如果有如下节点(此节点是为IIS 7设计的) ,则修改

复制代码
<requestLimits maxAllowedContentLength="2147483647" /> 单位与applicationhost.config中的<requestLimits maxAllowedContentLength="2147483647" />一致,它的最大值也只能为4294967295
<system.webServer>
<security>
<requestFiltering>
<requestLimits maxAllowedContentLength="2147483647" />
</requestFiltering>
</security>
</system.webServer>
复制代码

总结:asp.net(IIS 7 and IIS 7.5)上传文件的最大值不能超过2GB

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-10-22
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-10-04
  • 2021-05-11
  • 2022-12-23
相关资源
相似解决方案