开发者

asp.net mvc c# image upload page crashing

i a开发者_如何学运维m uploading an image ,when uploading image of a very large size the application crashes . i am checking the image size as well . but uploading image of a very large size bypass everything and crashes the application. What do u people suggest? what is the best practise?


ASP.NET's default max upload file size is 4MB. To upload larger files you need to add the following configuration in web.config file:

<system.web>
  <httpRuntime executionTimeout="240" maxRequestLength="10240" />
</system.web> 

This will set max file upload size to 10MB. You can also use it in location tag to apply the configuration only on specific directory.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜