c# - How to Increase item size in Http Post -


i posting data iis web server using c#.

i have used xml , mode , getting 'bad request error' when posting long data in 1 field. example,

<field1>ttttttttttttttttttttttttttttttttttttttttttttttttttttttt.......<field1> 

i have modified web.config

<webhttpendpoint>    <standardendpoint name="" helpenabled="true" automaticformatselectionenabled="true" maxreceivedmessagesize="21474836" maxbuffersize="21474836"  maxbufferpoolsize="21474836" ></standardendpoint>           </webhttpendpoint> 

what else need make work?

   <system.web>         <authentication mode="forms" />         <compilation debug="true" targetframework="4.0">             <assemblies>                 <add assembly="system.web.datavisualization, version=4.0.0.0, culture=neutral, publickeytoken=31bf3856ad364e35" />             </assemblies>         </compilation>         <httpruntime maxrequestlength="204800" executiontimeout="12000" requestvalidationmode="2.0" requestpathinvalidcharacters="" />     </system.web>     <system.servicemodel>         <servicehostingenvironment aspnetcompatibilityenabled="true"></servicehostingenvironment>         <standardendpoints>             <webhttpendpoint>                 <standardendpoint name="" helpenabled="true" automaticformatselectionenabled="true" maxreceivedmessagesize="21474836" maxbuffersize="21474836" maxbufferpoolsize="21474836"></standardendpoint>             </webhttpendpoint>         </standardendpoints>     </system.servicemodel> 

you need fix value in web.config requests, not wcf services, have done...

<httpruntime maxrequestlength="1234" executiontimeout="1200" /> 

you need increase number. httpruntime happens first - requests subject rules defined tag. request limit set wcf services applied if request passes check (and others) first.


Comments

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -