Is VFP hard crashing? Is it hard C5 error? Check the Event log which might tell you something more. Compile your EXE with debug info and then also check the VFP install folder for a crash file (vfp9rerr.log in the runtime DLL folder).
Can you try to simplify and call something real simple with ExpandTemplate() to rule out that ExpandTemplate is the problem? What are you doing in the templates? What is referenced in the templates and what code is executing in templates?
Templates by their nature are hard to debug because they are basically evaluated so there's no line of code to capture - Web Connection just parses through the file evals experssions and executes code blocks one at a time - there's no program that runs.
You can try using ExpandScript instead (especially if you have embedded code blocks) which does produce a PRG and can give you a possible line number of where the code crashed if you're running with debugging on in the EXE.
+++ Rick ---