In my opionio, there might something amiss with the hosting environment, try to enable WCF feature support in IIS.
![enter image description here]()
![enter image description here]()
Here is my service, wish it is useful to you.
IService1.cs
[ServiceContract]
public interface IService1
{
[OperationContract]
[WebGet]
string GetData(int value);
Service1.svc.
public class Service1 : IService1
{
public string GetData(int value)
{
return string.Format("You entered: {0}", value);
}
Web.config
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior>
<serviceMetadata httpGetEnabled="true" httpsGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior>
<webHttp />
</behavior>
</endpointBehaviors>
</behaviors>
<bindings>
<webHttpBinding>
<binding name="mybinding">
<security mode="Transport">
<transport clientCredentialType="None"></transport>
</security>
</binding>
</webHttpBinding>
</bindings>
<protocolMapping>
<add binding="webHttpBinding" scheme="http"/>
<add binding="webHttpBinding" scheme="https" bindingConfiguration="mybinding"/>
</protocolMapping>
<serviceHostingEnvironment aspNetCompatibilityEnabled="true" multipleSiteBindingsEnabled="true" />
</system.serviceModel>
Since the above configuration support both http and https protocol, we need to add http and https binding in IIS site binding module.
![enter image description here]()
![enter image description here]()
Reference.
How to make WCF Service Use HTTPS protocol
Feel free to let me know if there is anything I can help with.