Hi Marc,
Since you're using DI, and besides the fact it isn't appropriate for server programming, this isn't possible to force any component to release all memory, for a single reason: .Net franmework won't let you unload any loaded assembly and DI-proxy is only an assembly.
I see only three solutions:
- Going at a minimum to DI-Server - B1WS which consumes less memory, but for which you can force the unload of the service and by doing so to force it to release all it's memory,
- Going ideally to B1if, which with it's own DI-proxy mechanism will be able to restart periodically,
- If can't change from API, to do something that I did for a previous customer: moving all the business logic in a separate process (exe, not web-service neither DLL) which will be called by your web page and removed from memory when it's job is ended.
In all cases, by staying with DI your application won't go very far in terms of concurrency, disponibility and performance...
Regards,
Eric