Hi there,
I have a link to a third party marketing system that I send sales information to each morning. This has been going well until I tried to run it as a batch. In it I create a commaIO file and then transfer the file using HTTPWebRequest / HttpWebResponse. I have closed the commaIO file using commaIO.finalise() then called the method that does the http stuff. When I run it from a client it all goes well and I get the response that it's uploaded correctly BUT if I run it through the batch I get a response
System.Net.WebException: The remote server returned an error: (400) Bad Request.
at System.Net.HttpWebRequest.GetResponse()
at Dynamics.Ax.Application.Methodusedtosend.xpp:line 79
Line 79 is the first line of the catch statement ex = CLRInterop::getLastException();
I know the batch server has access to the internet as I have another link that uses a URL service that works fine. When I run this and save the commaIO file to disk instead of trying to send it to the HTTP it has data in the file. But when running via the batch server the only thing in the file is the headings - which is why it returns the bad request - it needs at least one line.
I thought it might not be releasing the file but I thought the the commaIO.finalise() should close and flush to disk.
Any ideas would be much appreciated.
Kind Regards,
Paulina
*This post is locked for comments
I have the same question (0)