How to get the client process name in the server when the server receives the request from the client?
Closed this issue · 6 comments
SaiBalaji202 commented
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?
UweKeim commented
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:
- Call
Process.GetCurrentProcess()
on the client to get the current client process. - Call
Process.ProcessName
on the returnedProcess
object. - Pass this name via ZetaIpc to the server.
SaiBalaji202 commented
I want to let the server know about the client. I don't want the client to send this extra information.
So, is there any way for the server to identify its client's process id?
UweKeim commented
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.
SaiBalaji202 commented
Can we get any details about the client from the server?
UweKeim commented
Why don't you try out by yourself? Debug, set breakpoint, inspect variables, etc.
SaiBalaji202 commented
I tried. But I can't. So only I raised an issue.