Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ServiceDiscovery not working on WiFi connection #111

Open
Trawacho opened this issue Mar 2, 2022 · 3 comments
Open

ServiceDiscovery not working on WiFi connection #111

Trawacho opened this issue Mar 2, 2022 · 3 comments

Comments

@Trawacho
Copy link

Trawacho commented Mar 2, 2022

Hello,
using this lines of code

[TestMethod]
public void DiscoverServiceInstanceRemote()
    {
        var service = new ServiceProfile("bar", "_foo._tcp", 4711);
        var done = new ManualResetEvent(false);
        var sd = new ServiceDiscovery();
        sd.ServiceInstanceDiscovered += (s, e) =>
        {
            if (e.ServiceInstanceName == service.FullyQualifiedName)
            {
                Assert.IsNotNull(e.Message);
                done.Set();
            }
        };
        try
        {
            sd.QueryServiceInstances(service.ServiceName);
            Assert.IsTrue(done.WaitOne(TimeSpan.FromSeconds(5)), "instance not founde");
        }
        finally
        {
            sd.Dispose();
        }
    } 

are working pretty fine as long as the machine is connected via cable. As soon as I switch to Wifi it doesn´t.
What I´m doing wrong?

@twofingerrightclick
Copy link

twofingerrightclick commented Jun 13, 2022

I am experiencing this as well. I cannot advertise or discover over my Wi-Fi Interface. Tested with the example programs in the repo ("Spike"). Windows 10, Visual Studio 2022.
Works fine over the ethernet interface, but if I unplug then no traffic.

@Christanoid
Copy link

I had the same issue for a while. My solution was that Windows automatically set the WiFi to public instead of private which in turn blocks mdns. Go to Settings => Network and Internet and then on the top it should tell you what kind of network it thinks you have.

@twofingerrightclick
Copy link

twofingerrightclick commented Sep 6, 2022

@Christanoid Thank you! That makes so much sense. I think that should close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants