I have a .Net 4.0 WCF service running on IIS. I have not specified a port so assume it is running on port 80. I need to install my service on a server where port 80 is already being used and the network guy had asked me to change my service to run on port 443. How do I do this? I'm guessing it can be configured in app.config but I can't find an article that shows me how.
Here is my current app.config:
<system.serviceModel>
<behaviors>
<serviceBehaviors>
<behavior name="">
<serviceMetadata httpGetEnabled="true" />
<serviceDebug includeExceptionDetailInFaults="false" />
</behavior>
</serviceBehaviors>
</behaviors>
<serviceHostingEnvironment multipleSiteBindingsEnabled="true" />
Just right click on your website that has the WCF Service or if the WCF service applciation is a website in your IIS then select edit bindings, now you can change the http to listen on a different port rather than 80.
The default port is 808.
Windows Communication Foundation (WCF) is a framework for building service-oriented applications. Using WCF, you can send data as asynchronous messages from one service endpoint to another. A service endpoint can be part of a continuously available service hosted by IIS, or it can be a service hosted in an application.
I am assuming you are running your services on net.tcp protocols.
1) Edit your bindings (right click Default Web Site
select Edit Bindings
2) Server Side
<service name="YouServiceNameSpace.YourService">
<endpoint address="" binding="netTcpBinding" bindingConfiguration="YourBinding" contract="YourContract" />
<endpoint address="mex" binding="mexTcpBinding" bindingConfiguration="" contract="IMetadataExchange" />
</service>
3) Client Side
<endpoint address="net.tcp://YourHost:443/YourServiceDirecotry/YourService.svc"
behaviorConfiguration="YourBehavior" binding="netTcpBinding"
bindingConfiguration="YourTcpBinding" contract="YourContract"
name="YourContractName" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With