UweKeim/ZetaIpc

How to get the client process name in the server when the server receives the request from the client?

Closed this issue · 6 comments

How to get the client process name in the server when the server receives the request from the client? Please help me to achieve this?

Why would you want to do this? Sounds like an XY problem to me.

If you really need it, use the actual IPC of this library to let the client tell the server its name:

  1. Call Process.GetCurrentProcess() on the client to get the current client process.
  2. Call Process.ProcessName on the returned Process object.
  3. Pass this name via ZetaIpc to the server.

The client is sending HTTP requests to the server. In my opinion you cannot determine the process ID of the originator of an HTTP request.

So for me, the answer is no, unfortunately.

Why don't you try out by yourself? Debug, set breakpoint, inspect variables, etc.