Is basicHttpBinding really required when exposing a WCF service as a Web Service for .NET 2.0 Target Client?

后端 未结 3 1762
栀梦
栀梦 2021-01-26 01:37

I have a WCF service and am hosting it in a Windows Service.

I tried to add a reference for the service from a Windows Form client built on .NET 2.0. I could get the Web

3条回答
  •  春和景丽
    2021-01-26 01:52

    the problem is mexHttpBinding isn't actually exposing your service, its only exposing a defenition of your service, and since .net 2.0 doesn't understand nettcp you get an empty namespace, you need basicHttpBinding becuase that is your actually service endpoint.

    if you look at the contracts you see that the contract for mexHttpBinding isn't even "HBAcsNX.HBAccess" but rather "IMetadataExchange".

提交回复
热议问题