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. z-index的妙用

    总是在纠结一个问题,当然我是前端初学者.这个问题就是,一个元素放在另一个元素里面,总希望它显示时,但是别撑开元素.这个时候一定要想到z-index. 例如今天写的一个浮动在导航栏下面的一个图片,我用的 ...

  2. 【转】android布局属性详解

    LinearLayout布局: 线性版面配置,在这个标签中,所有元件都是按由上到下的排队排成的.在这个界面中,我们应用了一个 LinearLayout的布局,它是垂直向下扩展的 ,所以创建的布局XML ...

  3. 原生Ajax书写

    1.创建XMLHttpRequest对象 function createXMLHTTPRequest() { //1.创建XMLHttpRequest对象 //这是XMLHttpReuquest对象无 ...

  4. table_open_cache

    当 MySQL 访问一个表时,如果该表在缓存中已经被打开,则可以直接访问缓存:如果还没有被缓存,但是在MySQL表缓冲区中还有空间,那么这个表就被打开并放入表缓冲区:如果表缓存满了,则会按照一定的规则 ...

  5. hdu1998 bjfu1272奇数阶幻方构造

    这题就是一个sb题,本来很水,硬是说得很含混.奇数阶幻方构造其实有好多方法,这题既不special judge,也不说清楚,以为这样能把水题变成难题似的,简直想骂出题人. /* * Author : ...

  6. UIButton 设置为圆形,并且使用图片(UIImage)当做背景

    -(UIButton *)shareButtonWithIcon:(NSString *)iconName { UIButton *button = [UIButtonbuttonWithType:U ...

  7. 浏览器URL传参最大长度问题

    这几天为解决一个BUG头疼了一段时间,BUG现象如下: 一个选择人员的选择控件,当选择多个人时(50多个的时候),返回没有错误现象,而再一次打开的时候就报404错误.看到这个错误非常纳闷,无法下手,只 ...

  8. javascript跑马灯抽奖

    <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8&quo ...

  9. 求职基础复习之快速排序c++版

    #include<iostream> using namespace std; int partition(int a[],int p,int q){ int x = a[q]; ; fo ...

  10. bzoj 2002 [Hnoi2010]Bounce 弹飞绵羊(LCT)

    [题目链接] http://www.lydsy.com/JudgeOnline/problem.php?id=2002 [题意] 给定n个数的序列,i可以跳到i+k[i],需要能够修改k并可以查询跳出 ...