I am testing a HttpHandler that accepts XML. It works fine when a small amount of data is posted but if I post data larger then approx 29mb, I get a asp.net 404 Error.

I am posting to the handler from another handler in the same project and I have tried 2 methods - 1. HttpWebRequest with "POST" 2. WebClient with UploadFile() and UploadData()

I get the same 404 error when the posted data is above 28.6 MB.

I also tried putting a breakpoint right in the beginning of the receiving handler and debugging. It is never hit. Appears like the handler was never called. Works ok for smaller sized data.

I already have the following setting. What am I doing Wrong?

<httpRuntimemaxRequestLength="1048576"/>

EDIT: I have also tried posting to a different handler that doesnt not consume posted data, just to test, but the results are the same. Environment: Win 7, IIS 7.5, .net 3.5, VS 2008 

asked Apr 23 '10 at 4:17
 
1  
 
I already have it set way high - maxRequestLength="1048576" – Vaibhav Garg Apr 23 '10 at 4:39
 
Are you uploading a file or posting a page? – Robert Harvey♦ Apr 23 '10 at 4:41
 
I have tried both uploading as a file (using Webclient) as well as posting (HttpWebRequest). the concerned data is a XML document – Vaibhav Garg Apr 23 '10 at 5:13

2 Answers

I discovered that the problem is with IIS 7 and above. It requires the max request length to be set in a different place.

See the following links -

http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/Q_22943810.html

http://msdn.microsoft.com/en-us/library/ms689462%28VS.90%29.aspx

The default value is 30000000. which is 28.6mb. The correct way to set in web.config is -

<system.webServer>
  <security>
    <requestFiltering>
      <requestLimits maxAllowedContentLength="1073741824">
      </requestLimits>
    </requestFiltering>
  </security> </system.webServer>

This config cleared the error I was getting. I wish the errors reported were more descriptive, at least on local machines

Does this mean that setting <httpRuntime maxRequestLength="1048576" /> is enough for IIS 6 ? (the live server is win2003)

answered Apr 23 '10 at 6:37
 

Posting data to a HttpHandler greater then ~29MB gives a 404 error的更多相关文章

  1. jQuery AJAX Call for posting data to ASP.Net page ( not Get but POST)

    the following jQuery AJAX call to an ASP.Net page. $.ajax({ async: true, type: "POST", url ...

  2. Data Flow ->> Excel Connection遇到错误:[Excel Source [16]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONFROMCONNECTIONMANAGER.....

    在SSIS下做Excel导入数据的时候遇到下面的错误 [Excel Source [16]] Error: SSIS Error Code DTS_E_CANNOTACQUIRECONNECTIONF ...

  3. Oracle Data Guard PING[ARC2]: Heartbeat failed to connect to standby ''. Error is 12514 故障分析

    朋友搭建的一套DG,折腾了很长时间,一直都是报如下错误: ORA-12514: TNS:listener does not currentlyknow of service requested in ...

  4. About USB Data Link Cable API

    About USB Data Link Cable API The text on this webpage is licensed under the Creative Commons Attrib ...

  5. CodeSimth - .Net Framework Data Provider 可能没有安装。解决方法

    今天想使用CodeSimth生成一个sqlite数据库的模板.当添加添加数据库的时候发现: .Net Framework Data Provider 可能没有安装. 下面找到官方的文档说明: SQLi ...

  6. [置顶] Oracle 11g Data Guard Role Transitions: Failover

    Role TransitionsInvolving Physical Standby Databases A database operates in one of the following mut ...

  7. Loading Data into a Table;MySQL从本地向数据库导入数据

    在localhost中准备好了一个test数据库和一个pet表: mysql> SHOW DATABASES; +--------------------+ | Database | +---- ...

  8. vue笔记-模板,计算属性,class与style,data属性

    数据和方法 1:只有当实例被创建时 data 中存在的属性才是响应式的,也可以预定义一些空的属性,唯一的意外就是Object.freeze(obj),这会阻止修改现有的属性;也就是说一个数据在放到根实 ...

  9. Android开发训练之第五章第六节——Transferring Data Using Sync Adapters

    Transferring Data Using Sync Adapters GET STARTED DEPENDENCIES AND PREREQUISITES Android 2.1 (API Le ...

随机推荐

  1. 通过对源代码的反向工程学习CoreData架构

    在本文开始,先给出反向工程后的结果: 不过需要注意,三个实例的指针都被同一个实例拥有,比如三个指针都位于appDelegate. 在AppDelegate类中定义了下面三个属性: @property ...

  2. 转载RabbitMQ入门(6)--远程调用

    远程过程调用(RPC) (使用Java客户端) 在指南的第二部分,我们学习了如何使用工作队列将耗时的任务分布到多个工作者中. 但是假如我们需要调用远端计算机的函数,等待结果呢?好吧,这又是另一个故事了 ...

  3. mysql EF

    使用 mysql-installer-community-5.6.26.0.msi visual studio 2013 update 4版 Install-Package EntityFramewo ...

  4. CCCallFuncN误用导致引用计数循环引用

    昨天测试“角色被遮挡部分透明显示”功能时,发现角色死亡后,其轮廓精灵不会消失.调试发现,角色在死亡时,其引用计数retain_count居然是9.这是由引用计数混乱引起的内存泄露. 加了很多日志跟踪r ...

  5. 查看linux服务器中的apache是否安装以及安装路径

    1.可以通过 apachectl -v 查看apache是否安装,如果安装了的话会显示版本号: 2.如果通过rpm包安装的话可以用  rpm -q  httpd 查看,如果安装的的话会显示包的名称

  6. 给MyEclipse 10增加SVN功能

    1.在myeclipse的安装目录下 myeclipse 10文件夹下的 dropins文件夹新建一个文件夹 svn. 2.然后下载SVN插件:svn插件网站:http://subclipse.tig ...

  7. HDU5742:It's All In The Mind(模拟+贪心 )

    题意: 给出n和m,表示n个数,之后会给出m个下标xi和值yi,a[xi]=yi,n个数是不下降的,且总和>0,要使得(x1+x2)/∑(xi)最大. 分析: 尽可能使得前两个数最大,其他数尽可 ...

  8. redis的lists类型

    List是一个链表结构 , 主要功能是push . pop .获取一个范围的所有值等等 , 操作中key理解为链表的名字 . redis 的 list类型其实就是一个每个子元素都是string类型的双 ...

  9. google_protobuf数据类型

    要通信,必须有协议,否则双方无法理解对方的码流.在protobuf中,协议是由一系列的消息组成的.因此最重要的就是定义通信时使用到的消息格式. Protobuf消息定义 消息由至少一个字段组合而成,类 ...

  10. 利用red5搭建一个简单的流媒体直播系统

    http://blog.sina.com.cn/s/blog_51396f890102exmz.html 一.red5安装.设置. 这个过程就不多说了,参见http://blog.csdn.net/l ...