【发布时间】:2010-11-24 23:54:12
【问题描述】:
我正在使用带有http://networkip:5678 服务主机的 BasicHttpBinding,我只是想独立托管,我没有使用 IIS...
let host = new ServiceHost(typeof<MyService>, [|new Uri("http://192.168.100.131:5678/")|])
let behavior = new ServiceMetadataBehavior()
behavior.HttpGetEnabled <- true
host.Description.Behaviors.Add(behavior)
let bind = new BasicHttpBinding()
bind.HostNameComparisonMode <- HostNameComparisonMode.StrongWildcard
host.AddServiceEndpoint(typeof<CQGService>, bind, "MyService") |> ignore
host.AddServiceEndpoint(typeof<IMetadataExchange>, bind, "MEX") |> ignore
host.Open()
它在本地机器上运行良好,但网络上没有人可以看到它...我看到另一篇要求运行 netstat 的帖子,所以我做了,我可以看到它在 0.0.0.0:5678 上监听。我有什么遗漏吗?
【问题讨论】: