#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    4
    Rep Power
    0

    Large stdin on IIS


    I have a very simple form on a web page:

    <FORM ACTION="test.exe" METHOD="post">
    <TEXTAREA NAME="field"></TEXTAREA>
    <INPUT TYPE=submit VALUE="submit">
    </FORM>

    The test.exe is a C program which does nothing, very simple:

    void main() {
    printf("Content-Type:text/html\n\n");
    printf("OK\n");
    }

    If I just hit Submit, then it does as expected: prints "OK" and ends. If I put some data into the TEXTAREA then it does the same. But if I put a large amount of data (~1MB) into the TEXTAREA, then it fails with error 103 ERR_CONNECTION_ABORTED.

    If I run it from command line then it works, ie. "test.exe < bigfile.txt" even if test.txt is large...

    Seems something about running it through IIS causes it to not work when there is a large amount of form data??
  2. #2
  3. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247
    Smells like a setup issue with IIS, perhaps the max. connection timeout or the max. post data size settings. Have you tried increasing the default values.
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    4
    Rep Power
    0
    I can submit large form data to .asp and .aspx scripts, so unless there's some difference with submitting to C programs, the IIS setup should be fine...
  6. #4
  7. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,616
    Rep Power
    4247
    Yes there is. ASP and ASPX run as part of the IIS process, whereas EXE files run as separate CGI processes fired off from IIS. There is a separate set of settings for CGI processes in IIS. In particular, there is a setting for max. timeout for CGI processes. See this link for how to tweak it.
    http://technet.microsoft.com/en-us/l...=ws.10%29.aspx
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    4
    Rep Power
    0
    I can see the timeout option but this is not the problem I am having. With a smaller form submission, the C app is taking about 20 seconds to process the data. But when I submit a larger form, it fails immediately, without waiting for any timeout. I can't see any option for increasing (or restricting) the maximum POST data size.

IMN logo majestic logo threadwatch logo seochat tools logo