[Mono-dev] mono wcf
hiking
wanrong1234 at gmail.com
Wed Mar 23 21:30:34 EDT 2011
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-tp3401351p3401351.html
Sent from the Mono - Dev mailing list archive at Nabble.com.
More information about the Mono-devel-list
mailing list