0
你好,我的控制台应用程序是我的wcf restful服务的主机,我最终设法工作(到目前为止)。我的问题是这个主机服务是否可以使用“POST”?它适用于获取但不确定是否需要主机在发布或删除时做更多事情?邮寄主机服务配置?
class Program
{
static void Main(string[] args)
{
string baseAddress = "http://" + Environment.MachineName + ":8000/Service";
ServiceHost host = new ServiceHost(typeof(RawDataService), new Uri(baseAddress));
host.AddServiceEndpoint(typeof(IReceiveData), new WebHttpBinding(), "").Behaviors.Add(new WebHttpBehavior());
host.Open();
Console.WriteLine("Host opened");
Console.ReadLine();