views:

52

answers:

2

I'm writing a small asp app to query a server. In order to query the script posts 2 values. One is an identifier of the user, and the second contains encrypted data.

I don't need to decrypt the data, but the user has to be able to paste a string thats 96,004 characters long (or upload a txt file containing it).

I standard html textarea or input only allows for 30,468 characters.

Any ideas on how to approach this?

+1  A: 

I've never heard of a text area actually chopping off characters at the 30K mark. It sounds like either the server or the browser has a post size limitation.

You can change the request size limitation on the server by changing your web.config to something like:

<configuration>
    <system.web>
        <httpRuntime maxRequestLength="4096" />
    </system.web>
</configuration>

Note that the length is in KB. So the above actually limits it to 4MB.

Chris Lively
I don't have access to the server to change that config. And I think you are correct, it may be a browser limitation
shaiss
I just looked up the default for .net. It's 4MB. So unless the server operator limited it down, it has to be a browser issue. If I had to take a guess I'd say your using Safari.
Chris Lively
In order to get around this, if you have access to change the code, get rid of the text box they use for copy/pasting the data and instead use a file upload.
Chris Lively
I'm implementing the latter for the time being. At least it will ensure cross-browser compatibility.
shaiss
A: 

The regular <input type="text"> has no such limit and neither should textarea. I still recommend input type=text because it's, in my experience, much faster than textarea to handle a large amount of text.

Jonas Elfström