非管理员帐户的 Windows PGM 套接字访问错误

发布于 2024-09-24 19:54:17 字数 283 浏览 3 评论 0原文

我正在尝试使用 PGM 套接字在 Windows 上发送数据。我可以使用非管理员帐户从 PGM 套接字良好地侦听和接收数据,但是当我尝试创建套接字来发送数据时,我在这一步遇到异常:

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

例外情况是:

尝试以访问权限禁止的方式访问套接字

请注意,如果我在管理员帐户下运行相同的代码,它可以正常工作。有没有办法创建发送者 PGM 套接字而无需在管理员帐户下运行?

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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

佼人 2024-10-01 19:54:17

我从来没有找到解决这个问题的方法。好像需要管理员权限。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文