If you want to deploy the wcf service to IIS, you need to add a mex endpoint, here is a demo:
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.serviceModel>
<services>
<service name="WcfService1.Service1" behaviorConfiguration="CalculatorServiceBehaviors">
<endpoint address=""
binding="netTcpBinding"
contract="WcfService1.IService1" />
<endpoint address="mex"
binding="mexTcpBinding"
contract="IMetadataExchange" />
</service>
</services>
<behaviors>
<serviceBehaviors>
<behavior name="CalculatorServiceBehaviors">
<serviceMetadata httpGetEnabled="false" />
</behavior>
</serviceBehaviors>
</behaviors>
</system.serviceModel>
</configuration>
Don't forget to set the value of httpGetEnabled to false.
After successful deployment, we can find the service in the browser:
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.