If AppInitialize () is not called when the deployment server is launched on your server, most likely you did not enable WCF Non-Http activation on this server.
Go to Control Panel> Program and Features> Turn Windows features on or off, and then find Microsoft.NET Framework 3.5.1. In this parameter, make sure that the option to activate the Windows Communication Foundation HTTP connection is set.
Adriaan de beer
source share