Ping forbidden when SocketPermissionAttribute is Unrestricted

G

Guest

Using .NET Framework v1.1 on Win2000 and WinXP

Low Level Users get this error when code does a Ping:
System.Net.Sockets.SocketExecption: An attempt was made to access a socket
in a way forbidden by its access permissions.

Ping is using ICmp protocol via a Raw socket.
Code works fine for high level users.
TCP/IP sockets and remoting work fine for low level user only Ping fails.
Fails even when Firewall is Off.

AssemblyInfo.cs contains:
[assembly: PermissionSetAttribute(SecurityAction.RequestMinimum,
Name="LocalIntranet")]
[assembly: SocketPermissionAttribute(SecurityAction.RequestMinimum,
Unrestricted=true)]
 
G

Guest

An (far better) alternative to this would be an easy quick responsive way to
determine if a computer/device is on the LAN or not in the API, at a level
that would allow programs run by low level users to do these checks without
the very lengthy time outs that are incurred in other parts of the API.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top