From f5aabde18930d667eeb3160a834139a62fd36836 Mon Sep 17 00:00:00 2001 From: Lucas Benninger Date: Sun, 24 Nov 2024 17:41:31 -0500 Subject: [PATCH] Update using-udp-services.md Set s.EnableBroadcast to true to avoid exception System.Net.Sockets.SocketException (13): Permission denied --- docs/framework/network-programming/using-udp-services.md | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/framework/network-programming/using-udp-services.md b/docs/framework/network-programming/using-udp-services.md index 4acc3c06f6868..5e75d31b36363 100644 --- a/docs/framework/network-programming/using-udp-services.md +++ b/docs/framework/network-programming/using-udp-services.md @@ -141,6 +141,7 @@ class Program static void Main(string[] args) { Socket s = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp); + s.EnableBroadcast = true; IPAddress broadcast = IPAddress.Parse("192.168.1.255");