The default maiximum input data size to an ASP.NET web service (NOT Wcf Service) apears to be 4 megabytes, but a process I am designing need to generate a maximum of 98, or 100 Megs to be on the safe side.
What factor in the Web.config do I need to increase to allow the larger size? Or is it somehwere else?
Web Services are not WCF Services, but both response to input being sent into them. Here is the method in the Web Service:
[WebMethod]
public string SubmitBatch(string batch)
{
try
{
string filename = String.Format("BatchSubmission_{0}_{1}.xml", DateTime.Now.ToString("yyyy-MM-dd_HHmmss"), batch.Length.ToString());
StreamWriter writer = new StreamWriter(@"C:\AFRSService\submissions\" + filename);
writer.Write(batch);
writer.Close();
return String.Format("Your batch ({0}) was submitted!", filename);
}
catch (Exception ex)
{
return String.Format("Your batch failed submission due to: {0}", ex.ToString());
}
}
The external method calling the web service and using the SubmitBatch() method looks like this:
AfrsServiceWS.AfrsService svc = new AfrsServiceWS.AfrsService();
string output = svc.SubmitBatch(input);
There is no problem for batches up to about 4 megabytes. After that I get a
System.Web.HttpException: Maximum request length exceeded.
The proposed closure is fine, I guess, but the supposed question with the five answers does not work in this case. I've set the maximum length as described and I still can't get the service to accept anything larger than 4 megabytes. This is frustrating.