Atozed Forums
Problem with sendfile in version 15.6.7 - Printable Version

+- Atozed Forums (https://www.atozed.com/forums)
+-- Forum: Atozed Software (https://www.atozed.com/forums/forum-1.html)
+--- Forum: Delphi General Discussion (https://www.atozed.com/forums/forum-13.html)
+---- Forum: Delphi General Discussion (https://www.atozed.com/forums/forum-11.html)
+---- Thread: Problem with sendfile in version 15.6.7 (/thread-5109.html)



Problem with sendfile in version 15.6.7 - manderson9960 - 03-18-2025

Greetings

I've used sendfile before in Delphi applications (10.4 Sydney) to send files built with ReportBuilder to the clients downloads folder.  All has worked well for years.

Now, I'm writing a new application to do this using the following code:

Code:
ppReport1.DeviceType:='PDF';
ppReport1.TextFileName:= 'D:\OnlineEntrys\Online Receipt - ' + formatdatetime('dd-mm-yyyy hh_nn_ss', now) + '.pdf';
ppReport1.ShowPrintDialog:=False;
ppReport1.ShowCancelDialog:=False;
ppReport1.ModalCancelDialog:=False;
ppReport1.ModalPreview:=False;
ppreport1.Print;
webapplication.SendFile(ppReport1.TextFileName, True);
ppreport1.reset;

The 'D:\OnlineEntries' folder was set up for me by the sysadmin to drop the files while I send them out.  The files are created successfully.

When I run the code, I receive the following message:

   

I've searched the documentation and the internet, and cannot figure out what this message is  trying 
to tell me.  Before I changed it to an ISAPI dll, I ran it as an exe file on my local computer, and it worked
fine.  My gut tells me that it's a permissions issue somewhere, but I have no idea where.

Any suggestions or comments would be greatly appreciated.

Regards,

Mark


RE: Problem with sendfile in version 15.6.7 - rozedecay - 06-12-2025

Hi Mark,

I’ve run into something similar before. One thing to check besides permissions: make sure the path is accessible in the context of the ISAPI runtime. Since ISAPI is more locked down than a local EXE, sometimes writing to local drives (especially D:\) can be blocked or restricted, depending on server policies or group policies.