Click here to Skip to main content
15,884,353 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Is there a way in C# to monitor a certain process DNS requests? I would like to monitor process and see which domain or IP it wants to connect to.
Is it possible? I know application like apateDNS do same thing, and I would want this to work in C#. with which name space and method!?

and another question:Is there a way in C# to monitor a certain process API requests?

thanks dear friend beforehand
Posted
Comments
Herman<T>.Instance 11-May-15 9:09am    
What have you tried?
era ahmadian 11-May-15 9:31am    
i used Process.GetProcesses(); for getting process information but actually i cant find a way for monitoring DNS reqeuest or API requests of a PID!maybe using System.Diagnostics; can be helpfull ! do you know any solution for that ,mate?!
Herman<T>.Instance 11-May-15 11:04am    
Did you look for a HTTPListener or something similar?
era ahmadian 12-May-15 3:34am    
yes mate!i really want to monitor application Domain requests!is t possible in C# ?!would you help me!?

1 solution

To monitor TCP traffic you need a low level driver to be installed, you can't do this in a high level language/platform like c#.
 
Share this answer
 
Comments
era ahmadian 11-May-15 9:39am    
thanks dear Mehdi Gholam! u mean there is no way for monitoring DNS requests in C#?!
then which language can do this requirement for me?!
Mehdi Gholam 11-May-15 9:42am    
You need to write a network driver which is usually done in C/C++.
era ahmadian 11-May-15 9:56am    
thanks dear mate ;)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900