I work with code from Any good .net package sniffs?
As part of the project and offline, I am trying to create a socket using the following line:
mainSocket = new Socket(AddressFamily.InterNetwork, SocketType.Raw, ProtocolType.IP);
On this line, I immediately get an exception
System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions
I do not think this is a problem with account permissions. I can run Fiddler in this account just fine.
Is it right to open the listener for outgoing packets? If so, what do I need to do to avoid a permission error?
Update : .net 4.0 Windows 7 Home Premium
source share