|
<< Click to Display Table of Contents >> Navigation: Telegram > 2021 > 11 > 02 > Telegram_2021-11-02T16 |
2021-11-02T16:28:27
This code of yours is failing because you are sharing a file among more than one session. If 2 users run this same part of the code at the same time, one will (try to) overwrite the other user's file. This will certainly raise some exception (file locked or something) or in the worst case scenario, one user will receive a file intended for other user (imagine the consequences of that in a banking system!).
You can't use the wwwroot directory as a working directory to save files like that. Don't do that. And don't try to add pseudo-random file names to the file as a \solution\ for this. This is not how it is supposed to work.
You must use IW's built-in cache mechanism.
2021-11-02T16:30:20
Besides that: AssignFile() like you did is just plain wrong. You don't use AssignFile() when you are copying a file. Please read what AssignFile() does in Delphil's help. It has a very specific usage and your case is definitely not one of them