简体   繁体   中英

How to host a WCF service

I am trying to create a chat application in WCF. I've created the client and the service on a localhost using httpBinding, this is the service endpoint:

http://localhost:9999/ProductService

Now, I really don't know how to make the program run 'globaly' and not on a localhost. Is there anyway to host the server on my pc? or run the application serverless using p2p communications? Thanks anyway for your Time

You can set up at publicly accessible web server on your own computer, but it's definitely not recommended for any production purposes, unless you have a good understanding of this and have a internet-connection that allows for it, both technically and legally.

You should probably get external web hosting for this instead.

But if you really want to do this, you can install IIS to host the service.

As a side note, I don't think WCF is the optimal route to take for this anymore. Maybee you should check out SignalR and/or WebSockets instead. And ASP.NET Core WebAPI. It's not really anything wrong with WCF, but for new projects I wouldn't recommend it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM