fixed a WebSocket building error
fixed a building error for Agent.Net45
added the process lock for the server instance process