【发布时间】:2011-03-23 05:43:22
【问题描述】:
创建服务主机后,我在使用Internet Explorer时无法打开页面“http://myuri:8000/ServiceModelSamples/Service”。
Uri baseAddress = new Uri("http://myuri:8000/ServiceModelSamples/Service");
// Step 2 of the hosting procedure: Create ServiceHost
ServiceHost selfHost = new ServiceHost(typeof(CalculatorService), baseAddress);
// rest of the below code is from calculator MSDN sample
仅当我使用 localhost 而不是“myuri”时它才有效。谁能告诉我还需要什么?
编辑:myri 实际上是我的 PC 名称。我也尝试为我的 PC 使用 IP 地址。 Internet Explorer 能够打开我的盒子中的 URL,但是当我从其他盒子打开 URL 时它会失败(例如,我试图打开的 URL 是 http://111.251.164.20:8000/ServiceModelSamples/Service)
【问题讨论】: