开发者

Windows PGM socket access error with non-admin account

开发者 https://www.devze.com 2023-01-18 00:35 出处:网络
I\'m trying to use PGM sockets to send data on Windows. I can listen and receive data fine from a PGM socket using a non-admin account, but when I try to create a socket to send开发者_开发技巧 data I

I'm trying to use PGM sockets to send data on Windows. I can listen and receive data fine from a PGM socket using a non-admin account, but when I try to create a socket to send开发者_开发技巧 data I get an exception at this step:

socket.Bind(new IPEndPoint(IPAddress.Any, 0));

The exception is:

An attempt was made to access a socket in a way forbidden by its access permissions

Note that if I run the same code under an admin account it works fine. Is there a way to create a sender PGM socket without running under an admin account?


I never found a solution to this. Seems like admin privileges are required.

0

精彩评论

暂无评论...
验证码 换一张
取 消