Accessing WCF service from a computer other than localhost

I am writing a WCF web service. I need to access the service from another (linux) computer.

On my PC, I can access the url via "localhost" just fine, however accessing it from another computer (replacing localhost with the machine name) does not work.

I'm relatively new to WCF and I'm guessing I need to configure it to allow requests from other computers, but I don't know how.

Here is the netstat output if it helps. Thank!

C: \ Users \ bb \ Desktop> netstat -na | findstr 57566

TCP 127.0.0.1:57566 0.0.0.0:01 LISTENING

+3


source to share


2 answers


How do you host your service? IIS or Embedded Web Server from Visual Studio? If it is a Visual Studio web server ("Cassini"), you cannot access it from other computers.

See this stack exchange question which is similar: https://serverfault.com/questions/82899/can-i-access-cassini-from-a-remote-machine



Microsoft wants you to deploy your application to IIS for remote connections. Cassini (Visual Studio Web Server) is for development purposes only.

+2


source


Are you using the service with Visual Studio? The ASP.NET development server that Visual Studio uses by default is only accessible from localhost. Depending on what you are doing, you can use IIS Express from Visual Studio. Otherwise, you will need to host your service in IIS.



0


source







All Articles