c# - WCF Udp Discovery in mono -


i need enable wcf discovery in mono project following this example test feature. test code:

uri baseaddress = new uri(string.format("http://{0}:8000/calc/{1}/",                      system.net.dns.gethostname(), guid.newguid().tostring())); using (servicehost servicehost = new servicehost(typeof(testservice), baseaddress)) {     servicehost.addserviceendpoint(typeof(icalc), new wshttpbinding(), string.empty);     servicehost.description.behaviors.add(new servicediscoverybehavior());     servicehost.addserviceendpoint(new udpdiscoveryendpoint()); //<-- exception here     servicehost.open();     console.writeline("press <enter> terminate service.");     console.readline(); }  [servicecontract()] public interface icalc {     [operationcontract()]     int sum(int a, int b); }  [servicebehavior()] public class testservice : icalc {     public int sum(int a, int b)     {         return + b;     } } 

now problem in line udpdiscoveryendpoint added. i'am getting exception:

contract 'targetservice' not implemented in service 'testservice'

i tried @ mono source, could't find workarounds problem. looking forward ideas how enable wcf discovery in mono or suggestions how fix test code. p.s. code works great using .net framework.

very unlikely @ time of question whether mono had wcf 4.5 udp working .


Comments

Popular posts from this blog

assembly - 8086 TASM: Illegal Indexing Mode -

Java, LWJGL, OpenGL 1.1, decoding BufferedImage to Bytebuffer and binding to OpenGL across classes -

javascript - addthis share facebook and google+ url -