WCF宿主的一点疑问
static void Main(string[] args)
{
WSHttpBinding binding = new WSHttpBinding(SecurityMode.None);
binding.MessageEncoding = WSMessageEncoding.Text;
Uri addressURI = new Uri("http://www.w3.org:8080/Calculator");
ServiceHost host = new ServiceHost(typeof(Calculator));
host.AddServiceEndpoint(typeof(ICalculator), binding, addressURI);
host.Open();
Console.ReadLine();
host.Close();
}
ServiceHost host = new WebServiceHost(typeof(Calculator), new Uri("http://localhost/Calculator"));