1

I am trying to implement a discovery feature in Mono.

The goal is a service running a .NET application with Mono on a Raspberry Pi 3 with Raspbian. This application should support a discovery feature.

First I tried it with the WCF Discovery Approach:

host.Description.Behaviors.Add(new ServiceDiscoveryBehavior());
host.AddServiceEndpoint(new UdpDiscoveryEndpoint());

This works perfectly in .NET but does always throws an InvalidOperationException:

Contract 'TargetService' is not implemented in this Service '....'

After some investigation, I figured that this is a Mono problem.

In this post:
Is there any way to use WCF Discovery in mono? They implemented a discovery with Mono.Zeroconf.

So I tried the Mono.Zeroconf approach:

To get it work I compiled the Mono.Zeroconf sources by my self, from here: https://github.com/mono/Mono.Zeroconf.
This worked perfectly in a Windows environment with Bonjour installed. But the provider for Avahi (which is the Linux equivalent for Bonjour) is outdated.
I managed to compile it anyway, but it does throw some strange exceptions when running under Raspbian / Mono.

So I can not find a solution to discover my Mono project running on a Linux machine from any other (Windows or Linux) environment.

Does anyone have a solution for one of the problems above or a completely new approach?

As long as I can implement it in .NET and run with Mono I am happy to use every solution out there.

Christoph Fink
  • 22,727
  • 9
  • 68
  • 113
Richy1989
  • 97
  • 7
  • Your closest hope is to show us what is the exact issue of "I managed to compile it anyway, but it does throw some strange exceptions when running under Raspbian / Mono". – Lex Li Nov 20 '17 at 13:22

0 Answers0