[Mono-dev] mono wcf
Alex
xtzgzorex at gmail.com
Thu Mar 24 09:48:11 EDT 2011
Hi
This scenario should work on Mono 2.8+, yes.
Cheers,
Alex
2011/3/23 hiking <wanrong1234 at gmail.com>:
> hi,
> i want to know if the mono works in the below situation.
> i have a server writing by wcf:
> static void Main(string[] args)
> {
> ServiceHost host = new ServiceHost(typeof(Foo));
> NetTcpBinding binding = new NetTcpBinding();
> binding.Security.Mode = SecurityMode.None;
> var uri = new Uri("net.tcp://localhost:8089/");
> Console.WriteLine(uri.AbsoluteUri);
> host.AddServiceEndpoint(typeof(IFoo), binding, uri);
> host.Open();
> Console.WriteLine("Hit [CR] key to close ...");
> Console.ReadLine();
> host.Close();
> }
> and my client is like this, supposed my server ip is 192.168.0.51, is on
> another computer:
> static void Main(string[] args)
> {
> var binding = new NetTcpBinding();
> binding.Security.Mode = SecurityMode.None;
> var endpoint = new
> EndpointAddress("net.tcp://192.168.0.51:8089");
> Console.WriteLine(endpoint.Uri.AbsoluteUri);
> var proxy = new ChannelFactory(binding,
> endpoint).CreateChannel();
> Console.WriteLine(proxy.Echo("TEST FOR ECHO"));
> Console.WriteLine(proxy.Add(1000, 2000));
> }
> can the client connect to server?
> Thank you!
>
> --
> View this message in context: http://mono.1490590.n4.nabble.com/mono-wcf-tp3398970p3398970.html
> Sent from the Mono - Dev mailing list archive at Nabble.com.
> _______________________________________________
> Mono-devel-list mailing list
> Mono-devel-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list
>
More information about the Mono-devel-list
mailing list