Last post Jul 08, 2013 07:32 AM by Illeris
Jul 04, 2013 09:28 AM|shivatejam|LINK
I have tried my best to find a solution for this,
I have a WCF Service which transfer a file from one system to other system, which are in same Network, this is called as FileTransfer Service(FTS). FTS accepts the byte stream and the file name.
Example: I have 5 Systems in my Network, I need to have the FTS in one of the System, all other 4 Systems should access one system and give the ByteStream + File Name as Input to the FTS, the FTS will save the file in the local system(i.e., in the same System
where FTS is running). It is working pretty well, when I deploy the service in IIS of the System(Where FTS is there) and give URI as service reference in other 4 systems.
But, the question is I dont want to use IIS, I can not use Self-Hosting Either(Coz, Self-Hosting will enable to access the Service in the same System, please correct me If I am WRONG). Give me a solution for this.
My Thoughts: Can we access a system's Service from another System in same network, with the help of System IP/System Name(Where my FTS is running)
Help needed, Urgency!!
Jul 04, 2013 06:51 PM|Prashant Kumar|LINK
I can not use Self-Hosting Either(Coz, Self-Hosting will enable to access the Service in the same System,
This is not correct. You can host a WCF service in a windows service that can be accessed over TCP.
More info here: http://msdn.microsoft.com/en-us/library/ff649818.aspx
Jul 05, 2013 09:41 AM|Illeris|LINK
Sample here : http://www.codeproject.com/Articles/46335/Host-WCF-as-Windows-Service-without-Installing
You can host in a Windows service, or in a default application (console, winforms, wpf, ...)
Jul 08, 2013 01:35 AM|shivatejam|LINK
Thanks for the reply Illeris!!
I have a doubt, If we host the WCF Service in a system(Local System) using WAS/Self-Hosting Can I have an URI with which I can use the service in any other System(Client System) in the same network.
Jul 08, 2013 01:41 AM|shivatejam|LINK
Thanks for reply, can we access through TCP?? Woow!!
Now, I want to keep the question straight, If I host a WCF Service in Win Service/Self-Hosting, do we get any URI, through which I can consume the WCF Service in any Client Machine on the same Network.
As we get a URI, when we host the WCF Service in IIS, the Service can be used in any client machine using the same URI, similarly any thing as such through Self-Hosting/ Hosting in Win Serivces.
Jul 08, 2013 07:32 AM|Illeris|LINK
you can host on any available port on the system. The URI could be somehting like: net.tcp://localhost:12345/MyService.svc. You determine this port yourself. it must be free.
For TCP + SSL => you'll need to register the certificate for that port. It is a little much more complex then when you host on IIS using https as protocol.
For accessing the service from other machines, use the net.tcp://servername:12345:MyService.svc URI, where <servername> is the machinename or domainname of the server hosting the windows service.