I am currently using a multiline textbox for my users to submit very large strings of data to me. I noticed that multiline text boxes have a maximum capacity of around 4 billion characters or memory that's available (whichever is smaller.) The string that I am using for test purposes is well below 4billion characters). However I'm still unable to submit my data. When I click the submit button, the data is programmed to write to a .txt file in root folder AND the data gets printed on screen using a label:
<asp:Label ID="lblmsg" Font-Bold="false" style="white-space:pre;" runat="server" Text=""></asp:Label>
On Safari, I get the required validation error before I can submit. (If I disable the validation code, I get re-routed to my web app's error page on submission.)
And on Chrome I get no validation error, I click submit, the input gets uploaded to 100% and then I get my web app's error page.
I'm thinking, the reason for my error could be any of the possible reasons:
1) Either the label or web app can't handle that much data on one page. Or:
2) I am using the basic Microsoft Azure web app service plan to host my webform. Maybe there is a processing restriction that I am hitting.
Here is the code for my validator code: (Even though I don't think that's the problem.
<asp:RequiredFieldValidator ValidationGroup="g1" ControlToValidate="txtvalue" ForeColor="Red" ID="RequiredFieldValidator1" runat="server" ErrorMessage="empty or contains more than 4,294,967,295 characters (or an amount based on available memory, whichever is smaller)."></asp:RequiredFieldValidator>
<br /> <asp:RequiredFieldValidator ValidationGroup="g1" ControlToValidate="txtvalue2" ForeColor="Red" ID="RequiredFieldValidator2" runat="server" ErrorMessage=" empty or contains more than 4,294,967,295 characters (or an amount based on available memory, whichever is smaller.)"></asp:RequiredFieldValidator>
<br /> <asp:RegularExpressionValidator ValidationGroup="g1" ForeColor="Red" ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtvalue" ErrorMessage="Invalid delimiter format. Make sure to use one consistent delimeter: (comma, space, or tab)." ValidationExpression="^\s*-?[0-9][0-9]*\s*(?=([., \t]))(?:\s*(?:\1|\r?\n)\s*-?[0-9][0-9]*)+\s*$"></asp:RegularExpressionValidator>
<br /> <asp:RegularExpressionValidator ValidationGroup="g1" ForeColor="Red" ID="RegularExpressionValidator2" runat="server" ControlToValidate="txtvalue2" ErrorMessage="Invalid delimiter format. Make sure to use one consistent delimeter: (comma, space, or tab)." ValidationExpression="^\s*-?[0-9][0-9]*\s*(?=([., \t]))(?:\s*(?:\1|\r?\n)\s*-?[0-9][0-9]*)+\s*$"></asp:RegularExpressionValidator>
Here is my web.config code which I think is also okay:
<configuration>
<system.web>
<compilation targetFramework="4.5" />
<!-- 50MB in kilobytes, default is 4096 or 4MB-->
<httpRuntime maxRequestLength="1073741824" executionTimeout="3600" targetFramework="4.5" />
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
<system.webServer>
<security>
<requestFiltering>
<!-- 50MB in bytes, default is 30000000 or approx. 28.6102 Mb-->
<requestLimits maxAllowedContentLength="52428800" />
</requestFiltering>
</security>
</system.webServer>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None" />
</appSettings>
</configuration>
And here is the link to the input I'm testing with.