正在获取远程服务器返回错误:(500)内部服务器错误. [英] Getting Remote server returned an error: (500) Internal Server Error.

查看:250
本文介绍了正在获取远程服务器返回错误:(500)内部服务器错误.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我正在使用My.Computer.Network.UploadFile()方法上传电影文件.

我使用IIS作为Web服务器,使用Oracle作为数据库.

使用上述功能,我可以成功上传2.5MB视频文件.

但是,如果我尝试上传25MB的文件(Windows示例视频文件),则会出现
异常 远程服务器返回错误(500)内部服务器错误.

我确认没有身份验证问题.也没有连接超时问题(因为我使用的是100秒默认超时).

您能告诉我该错误的原因吗?

是因为尺寸问题吗?

如果可以,我可以上传的最大大小限制是多少?

Hi,

I am using My.Computer.Network.UploadFile() method to upload a movie file.

I am using IIS as webserver and Oracle as the data base.

With the above function I can upload a file of 2.5MB video file successfully.

But if I tried to upload a file of 25MB(Windows sample video file) I am getting exception as
Remote server returned an error (500) Internal Server Error.

I confirmed that there is no Authentication problem. Also no connection timeout problem(As I am using 100sec default time out).

Could you let me know the reason for the error.

Is it because of the size problem?

If so what is the max size limit which I can upload?

推荐答案

我找到了答案.

Computer.network.Uploadfile()的最大大小在2个地方定义.

1. web.config文件.
参数为maxRequestLength.

默认情况下,maxRequestLength为10 MB.

我将其增加到30 MB,并成功上传了20 MB的视频文件.


2.在IIS中有请求过滤器.

将最大允许大小设置为所需大小.



web.config也具有超时参数.默认情况下为2分钟.


问候,

Vijay
I have found the answer.

The maximum size for the Computer.network.Uploadfile() is defined in 2 places.

1. web.config file.
Parameter is maxRequestLength.

By default maxRequestLength is 10 MB.

I increased it to 30 MB and sucessfully uploaded 20 MB video file.


2. In IIS there is request filter.

Set the maximum allowed size to required size.



web.config also has timeout parameter. By default it is 2 mins.


Regards,

Vijay


这篇关于正在获取远程服务器返回错误:(500)内部服务器错误.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆