Hello,
I developed an AIF service to import trade agreement journals. This works great but the end users occasionally request to import extremely large files. Upwards of 80,000 records into the PriceDiscAdmTrans table at one time. So far it has always worked great, but today we attempted an XML file that was 26,666 KB. This threw an error: Insufficient memory to run script. After much research, I discovered that this is being generated from the AIF gateway prior to actually importing the file. In the AIFGatewayQueue table method, AX attempts to assign the entire XML to a string variable using System.IO.File::ReadAllText. This works great up to 25MB. Once the XML file is one byte over 25MB, it throws the error. The AX string isn’t the issue I believe. It really seems to be the System.IO.File manipulation. It can’t exceed 25MB.
So, I’m wondering if there is any way to modify the size limit imposed on the System.IO.File::ReadAllText. Or, if that is not possible, what would be the best way to read the XML (txt file in reality) in sections and amend it to the string. Any info or suggestions would be helpful. Thanks!