Is entity access allowing the user to read the document?
I would suggest to debug the entire XML generation, as the download is very simple activity in Mendix.
Probably check if you an using a huge dataset to generate the XML, which makes it unresponsive.