Maybe this is unrelated to your problem, but there was a potential DoS vulnerability disclosed not so long ago in the
MapUrlToZone API.
(the top-most entry in your stack trace)
CVE:
https://www.cve.org/CVERecord?id=CVE-2025-21276Some details:
https://windowsforum.com/threads/cve-20 ... ed.349591/I'd check the IIS-logs and the Windows Event-Logs for unusual activity just to be sure.
I'd install the latest Windows-updates as well.
If that doesn't help, there are some strategies you could try.
- Implement retries (depending on your workflow this could be implemented server-side or client-side). Add delays between retries.
- Load images from streams instead of file-paths/urls (to bypass the affected API). This might not be possible if you have to load images from remote servers.
- While it
may work
most of the time, i would generally advice
not to use client-APIs like GDI (or WPF in your case) in server-code. Try to switch from the WPF-build to the CORE-build of PDFsharp/MigraDoc.
As refactoring your app to use the CORE build of PDFsharp/MigraDoc could be non-trivial, i'd pick the low-hanging fruit first.
As to your second question:
The file-paths in the stack-trace (d:\THHO...) are stored in the debug-information of the assemblies (*.pdb-files).
They refer to paths on the machine where the assemblies were build, not to the machine they are executed on.