我如何在Asp.net中上传40 MB的excel文件 [英] how can I upload 40 MB excel file in Asp.net

查看:91
本文介绍了我如何在Asp.net中上传40 MB的excel文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我可以使用sqlbluk方法在asp.net中上传22 MB的excel文件,但是
当我上传40 MB的文件时,它没有上传到数据库中,并且我也没有收到任何错误.

我还在Web配置中添加了标签,以增加文件的上传大小,
应用.但这不起作用.

建议我可以在asp.net应用程序中上传的excel文件的最大大小
以及执行此操作的最佳方法是什么.

以下是我在Web配置中所做的更改,供您参考

I can upload 22 mb excel file in asp.net by using sqlbluk method But
when i upload 40 mb file it is not uploaded in database and also i did not get any error.

I have also included the tag in web config to increase the file uploading size in my
application. But it is not working.

suggest me the maximum size of excel file which i can upload in asp.net application
and what is the best way to do this.

The change i had done in web config is given below for your reference

<httpruntime maxrequestlength="2097151" executiontimeout="36000" />

推荐答案

嘿!看看有-[ ASP.NET] [ ^ ]
来自参考:-
Hey! have a look there-[Large file uploads in ASP.NET][^]
from reference :-
<location path="Upload">
    <system.web>
        <httpRuntime executionTimeout="110" maxRequestLength="20000" />
    </system.web>
</location>



甚至最好选择以下选项
自定义HttpHandler通过显示上传进度并允许您以更可控的方式处理文件大小问题,可以提供更好的用户体验.以下是粗略搜索的摘要:
FileUploader.NET [那里-[如何在ASP.NET中上传大文件] [^ ]



and even better to opt below option
A custom HttpHandler can provide a better user experience by displaying upload progress and allowing you to handle a file size problem in a more controlled fashion. Here''s a summary from a cursory search:
FileUploader.NET[^]

you can take a look Same suggestion also there-[How to Upload Large Files in ASP.NET][^]


上传大量文件ASP.NET [
Large file uploads in ASP.NET[^] discusses some approaches for large files.


这篇关于我如何在Asp.net中上传40 MB的excel文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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