ASP.Net Post timeout

后端 未结 3 1317
半阙折子戏
半阙折子戏 2020-12-10 16:12

I am stuck with asp.net post issue with last 2 weeks.

Scenario:

My application page has 3 controls. A WYSIWYG editor (Free Textbox), a text

相关标签:
3条回答
  • 2020-12-10 16:30

    Try this, In your web.config , add the following

          <httpRuntime maxRequestLength="8096"/>
    

    somewhere in <system.web> tag, since the default request length is 8096, your postdata might be greater than that, so add it with a bigger value than i provided. Hope this shall help.

    0 讨论(0)
  • 2020-12-10 16:38

    Have you looked at whats being posted back?

    Try something like Fiddler2 to view the postback.

    You may find that something is being truncated at the browser.

    The RichText area may also be limited by the number of chars it will post back.

    0 讨论(0)
  • 2020-12-10 16:46

    I have face the same error on one web page. Its was very wired because if I was use proxy, the error go way, if I was called from my computer direct I have time out, and never go on.

    The site that this issue appear until now Dec/2011 is the http://www.auctionsniper.com/ The same site works if I go with the mobile version of it.

    After many checks with the above site I discover that the problem was with the very big viewstate !. How I find it: I save an html part of my page, as its rendered and start remove items from the html and make post, until I discover that the post continue when I cut down the viewstate post.

    The solution was to disable viewstate on many non needed controls and compress+cut in smaller part the remaining viewstate post data.

    You can google and find many ways to compress and cut the view state in parts.

    Some articles:

    http://msdn.microsoft.com/en-us/magazine/cc188774.aspx

    how to cut it tutorial:
    http://www.dotnetfunda.com/articles/article634-viewstate-patterns-in-aspnet-.aspx

    how to compress it
    http://www.hanselman.com/blog/ZippingCompressingViewStateInASPNET.aspx
    http://www.codeproject.com/KB/viewstate/ViewStateCompression.aspx
    http://www.google.com/search?hl=en&safe=off&q=asp.net+compress+viewstate&aq=f&aqi=g1g-b2&aql=f&oq=

    Ps: In this demo page of the free TextBox that you use, the viewstate is huge ! and its even empty from text, imagine how big the viewstate can be if you actual have and text inside. Not so free - the cost is the huge viewstate.

    Follow up

    As Jeyara say on the comments below, final this was the error, a blocking of large post files by a firewall on the hosting server.

    So the error / timeout have to do with large post back data and its a rare but existing issue.

    0 讨论(0)
提交回复
热议问题