Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9066043
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T16:39:07+00:00 2026-06-16T16:39:07+00:00

I am setting up a small local network with 3 laptops. My goal is

  • 0

I am setting up a small local network with 3 laptops. My goal is to experiment with the UpNP protocol and have the laptops discover each other using UpNP. In order to do this, they need to be able to listen for notifications from each other. As per the protocol, these notifications are sent on multicast address 239.255.255.250:1900. However, I am having a problem setting the laptops up to listen on that address. I am starting just using 1 pc. My PC’s IP address is 10.0.0.5.

However, when I try to set up a UdpClient to listen on 239.255.255.250:1900 I get an error saying: “The requested address is not valid in its context”.

I have tried just setting it up using this:

IPEndPoint endpoint = new IPEndPoint(IPAddress.Parse("239.255.255.250"), 1900);
UdpClient client = new UdpClient(endpoint);
client.BeginReceive(MessageReceived, null);

I have also tried:

UdpClient client = new UdpClient(Port);
client.JoinMulticastGroup(IPAddress.Parse("239.255.255.250"));
client.BeginReceive(MessageReceived, null);

But I still get the same error: “The requested address is not valid in its context”.

How do I correctly set up my UdpClient to listen on the multicast address 239.255.255.250:1900 ?

Thanks for your help!!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T16:39:09+00:00Added an answer on June 16, 2026 at 4:39 pm

    Ok, after much searching and banging my head on my desk, I’ve got this thing working. I thought I had it working yesterday, but it only worked on Windows 7 and not on XP..

    So, here it goes:

    IPEndPoint localEndPoint = new IPEndPoint(IPAddress.Any, Port);
    
    UdpClient client = new UdpClient();
    client.Client.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);
    client.Client.Bind(localEndPoint);
    client.JoinMulticastGroup(IPAddress);
    client.MulticastLoopback = true;
    
    Client.BeginReceive(MessageReceived, null);
    

    I sure wish this was documented a bit better, but I guess that’s why we get the big bucks $$$.

    Thanks StackOverflow for providing such an AWESOME knowledgebase from which to extract this stuff !!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a small asp.net mvc app running on WIN2k3 and IIS6. I'm using
I've written a small app that creates a GUI for setting up uShare. Currently
I am setting up a github account, to work on a small project with
I have a small website sitting in a sub-domain of my main site. I'm
I have a fairly small corpus of structured records sitting in a database. Given
Setting up a project structure; I am thinking is it better to have somewhat
Setting onchange event for CheckBoxList using the following code doesn't work. chkListUserGroup.Attributes.Add(onchange, document.forms[0].isRecordModified.value='true';); How
I am working on a small QtQuick 2.0 project and using Offline Storage API
recently I started a small Django project that I developed on a local machine
Doing DJango 1.3 local development using manage.py runserver Created a directory called static in

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.