How do I host WCF services through TCP Ports, and how do I listen to it and consume services through these TCP ports?
That is, apart from the net.tcp binding, is there some way to host and consume using TCP ports?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In WCF, you can host any service by yourself by creating an instance of the ServiceHost class, configure it with the correct endpoints and the service implementation you wish to expose, and call
Openon it. This is called self-hosting because you host the service (and its port listeners) from within your own application.Alternatively, you can host your service in IIS, but you should be aware that while you can host WCF in IIS 6, it only allows you to host HTTP and HTTPS endpoints. If you want to host TCP endpoints in IIS (which is a good idea), you will need IIS 7.
Read more here.