question

DarrylHoar-1832 avatar image
0 Votes"
DarrylHoar-1832 asked Bruce-SqlWork commented

Ways to communicate between two programs in windows c#

Greetings,
I have created a winform application in c#. I have also created a custom window service in c#.
I communicate between them using Sockets and it works fine.

Unfortunately when they are installed in a tightly secured network, the port that is opened is a problem. Getting the port "opened" in the firewall is difficult and time consuming.

Is there a method that is equally as good as sockets but won't cause the security issues I'm observing? Just checking as this has become a bit painful.

thanks,
D

dotnet-csharp
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@DarrylHoar-1832
WCF should be an option.
What Is Windows Communication Foundation
If you encounter any problems in the process of using it, you can post a question with the windows-wcf tag.

0 Votes 0 ·
RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered DarrylHoar-5879 commented

Have you considered using named pipes?

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I've read a little on WCF, Shared Memory and named/unamed pipes. The going thought at the time was the sockets were the best. Since I've run into the security fun, I've been thinking about alternatives.

Of the alternates, do you think named pipes are the way to go if sockets are not ?

Thanks.

0 Votes 0 ·
DarrylHoar-5879 avatar image
0 Votes"
DarrylHoar-5879 answered Bruce-SqlWork commented

Do named pipes required modifications to the firewall rule set to allow them to work?
The entire reason to move from sockets to named pipes would be to avoid this.

Thanks!

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

yes, a secure server may have named pipe blocked also. named pipes use UDP ports 137, 139. Over tcp its port 445


0 Votes 0 ·
RLWA32-6355 avatar image
0 Votes"
RLWA32-6355 answered

See the following for a discussion of the protocols used for named pipes. 4de75e21-36fd-440a-859b-75accc74487c


5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.