Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
458 Beiträge
 
#3

AW: Ist tDirectory Threadsicher?

  Alt Heute, 08:51
Hi,
Habt ihr noch Ideen was es sein könnte?
I would suggest the most important thing, check the operation result, i mean file/folder deletion if it is executed then log the last error, this will reveal most the details to find a fix, did the delete reached? did it fail? why it fail ?

About why it fail, i suspect it is a permission problem as it is complex and complicated permission between the isolated IIS worker process, and threads created by it, the user of the worker which is part of IIS_IUSRS, but which one ?
Also notice your running user is configured by IIS application pool identity.

Now from https://learn.microsoft.com/en-us/tr...ns-user-rights
You can see that there is very different permissions for specefic paths and users, take an example of "\inetpub\wwwroot", IIS_IUSRS can only "Read & execute" meaning no writing (and even no listing), no writing means no deletion, this easily can be reported by GetLastError.

Also i would recommend against running your own threads, by creating them with TThread.Create or CreateThread Directly, or by calling from the RTL like ITask, these threads are your own and will run outside of the IIS scope of control, keeping in mid IIS can and might terminate (yes terminate) threads at any moment, any synchronization/waiting between these groups can only leads to all sort of problem, if you really want background threads then create one or few from the DLL itself, and comunicate them with messages or any other fitting way, keepingin mind they (IIS threads) might be killed, so no waiting.
Kas
  Mit Zitat antworten Zitat