【问题标题】:WCF works locally but not remotelyWCF 在本地工作,但不在远程工作
【发布时间】: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 上监听。我有什么遗漏吗?

【问题讨论】:

    标签: .net wcf


    【解决方案1】:

    仔细检查确保您没有防火墙阻止该端口

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-01-27
      • 2021-07-14
      • 2015-09-12
      • 2023-04-03
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多