Search code examples
c#.netwcfwcf-wshttpbinding

Consume WCF service with wsHttpBinding using web reference


WCF service is running with wsHttpBinding. Is it possible to consume this service using web reference not service reference?

Thanks in advance


Solution

  • web reference is the old-style, deprecated ASP.NET webservices (ASMX) technology (using only the XmlSerializer)

    You cannot consume service exposed on wsHttpBinding with default configuration by old ASMX. Default configuration of wsHttpBinding uses advanced security and ASMX doesn't support it.

    You must either add service reference / svcutil or change your binding to basicHttpBinding.