首页 新闻 会员 周边

iis运行项目引发类型为“System.OutOfMemoryException”的异常。

0
[已关闭问题]

我在iis运行了大文件上传,但是报了System.OutOfMemoryException”的异常。iis服务器内存溢出,怎么解决啊,我在网上说让修改machine.config
<processModel
                enable = "true"
                timeout = "10675199.02:48:05.4775807"
                idleTimeout = "10675199.02:48:05.4775807"
                shutdownTimeout = "00:00:05"
                requestLimit = "2147483647"
                requestQueueLimit = "5000"
                restartQueueLimit = "10"
                memoryLimit = "20"
                webGarden = "false"
                cpuMask = "0xffffffff"
                userName = "machine"
                password = "AutoGenerate"
                logLevel = "Errors"
                clientConnectedCheck = "00:00:05"
                comAuthenticationLevel = "Connect"
                comImpersonationLevel = "Impersonate"
                responseDeadlockInterval = "00:03:00"
                responseRestartDeadlockInterval = "00:03:00"
                autoConfig = "false"
                maxWorkerThreads = "20"
                maxIoThreads = "20"
                minWorkerThreads = "1"
                minIoThreads = "1"
                serverErrorMessageFile = ""
                pingFrequency = "10675199.02:48:05.4775807"
                pingTimeout = "10675199.02:48:05.4775807"
                maxAppDomains = "2000"
            />

将他修改成这样,但是还是报错啊,怎么回事啊,有人遇见过吗?

问题补充: <httpRuntime maxRequestLength="size in kbytes"/>。 web.config 中的httpruntime我已经设置到最大了。
rains的主页 rains | 小虾三级 | 园豆:860
提问于:2010-07-04 16:35
< >
分享
其他回答(1)
0

在web.config中设置一下<httpRuntime maxRequestLength="size in kbytes"/>。

参考文章:http://www.cnblogs.com/bober/archive/2008/11/20/1337486.html

<httpRuntime useFullyQualifiedRedirectUrl="true|false"
             maxRequestLength="size in kbytes"
             executionTimeout="seconds"
             minFreeThreads="number of threads"
             minFreeLocalRequestFreeThreads="number of threads"
             appRequestQueueLimit="number of requests"
             versionHeader="version string"/>
dudu | 园豆:31003 (高人七级) | 2010-07-04 16:47
<httpRuntime maxRequestLength="size in kbytes"/>。我已经设置了,但是我上传的是1G多啊,我把maxRequestLength设置到最大了,也就是能上传大概2G的文件。所以报了这样子的错?
支持(0) 反对(0) rains | 园豆:860 (小虾三级) | 2010-07-04 17:02
@shumiao:1G多的文件太大了,如果是32位操作系统,IIS应用程序池只能使用2G内存,建议使用大文件上传组件,比如:http://www.cnblogs.com/bestcomy/archive/2004/06/09/14267.html
支持(0) 反对(0) dudu | 园豆:31003 (高人七级) | 2010-07-04 17:21
你给的这个怎么还要钱啊,我用 的是vs2008的你要是帮人就帮到底给个简单的例子啊,谢谢了
支持(0) 反对(0) rains | 园豆:860 (小虾三级) | 2010-07-05 08:49
0

楼主,去找个大文件上传的组件吧,上传1G文件?放在内存中?服务器肯定受不了.

I,Robot | 园豆:9783 (大侠五级) | 2010-07-05 09:10
我也知道啊,但是你用过吗?我这几天找了啊,都不是太好用,你要是有的话给我个啊
支持(0) 反对(0) rains | 园豆:860 (小虾三级) | 2010-07-05 10:32
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册