473,387 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Sockets firewall problem

Dear all,
I am trying too use sockets for IPC communication on one and the same
machine. When following code is executed windows firewall pops up. Is there
any possibility to use sockets without a risk to be blocked by firewall.
private void ListenIPC( ){

while(true){

TcpListener tcpListener = new TcpListener(10);

tcpListener.Start();

Socket socketForClient = tcpListener.AcceptSocket();
if (socketForClient.Connected) ...
Mar 14 '06 #1
4 2938
"Boni" <no****@parampam.pam> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
Dear all,
I am trying too use sockets for IPC communication on one and the same
machine. When following code is executed windows firewall pops up. Is
there any possibility to use sockets without a risk to be blocked by
firewall.


You need to use the Windows firewall API to open a port to yourself to make
it work in all cases.

See
http://msdn.microsoft.com/library/en...asp?frame=true

Yes, it's a pain.

-cd
Mar 14 '06 #2
Hi Carl,
is there any simple sort of IPC between managed and unmanaged on local
machine which is bidirectional, fast and don't care firewalls?
Thanks a lot,
Boni
"Carl Daniel [VC++ MVP]" <cp*****************************@mvps.org.nospam >
schrieb im Newsbeitrag news:OY**************@TK2MSFTNGP11.phx.gbl...
"Boni" <no****@parampam.pam> wrote in message
news:OH**************@TK2MSFTNGP09.phx.gbl...
Dear all,
I am trying too use sockets for IPC communication on one and the same
machine. When following code is executed windows firewall pops up. Is
there any possibility to use sockets without a risk to be blocked by
firewall.


You need to use the Windows firewall API to open a port to yourself to
make it work in all cases.

See
http://msdn.microsoft.com/library/en...asp?frame=true

Yes, it's a pain.

-cd

Mar 14 '06 #3
Boni wrote:
Hi Carl,
is there any simple sort of IPC between managed and unmanaged on local
machine which is bidirectional, fast and don't care firewalls?


Named pipes would seem a logical choice. Another option would be something
custom built using shared memory.

-cd
Mar 14 '06 #4
> Named pipes would seem a logical choice. Another option would be something
custom built using shared memory.


These articles might help you.
http://www.codeproject.com/csharp/do...pipespart1.asp
http://www.codeproject.com/csharp/do...pipespart2.asp
http://www.codeproject.com/threads/N...pesTracing.asp
http://www.codeproject.com/threads/anonpipe1.asp

The .NET articles are in C#. if you use MC++ or C++/CLI for your managed app
you can simply translate them. the classes and methods stay the same.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Mar 14 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Thomas Dybdahl Ahle | last post by:
Hi, I'm writing a program using sockets, but it doesn't work if the host/server has a firewall/router (don't know if only the client has a firewall) I get a "unable to open IO stream" error at...
6
by: Ted | last post by:
Hello all, Please could somebody with a little time on their hands help me with my net sockets program? The aim is to send multiple transactions via C# network stream and read them back. The...
10
by: Shaniqua Jones | last post by:
I've designed a C# application consisting of two EXEs: a client and server. The server runs on my Win2000 Server box, and the client runs on my customers' machines -- typically XP. The client app...
2
by: Ken Hughes | last post by:
Hi I'm looking for some advice on architecure - apologies if this is the incorrect group.. I'm writing a VB app and it has to pass data to a another server machine (in a different office)....
6
by: Tiraman | last post by:
Hi, if i need to send some data over the net to server what is the best way (http , socket or other ) to do that ? Best Regards , Tiraman :-)
10
by: altaf.sunesara | last post by:
Hello ! I have some devices which communicate trough LAN to the server the old form i was using was FTP as a communication between Server and Client i have decided to use personal TCP sockets...
8
by: rodmc | last post by:
I am new to Python and have been writing some socket based programmes on Windows (with some success), however I am unable to get them to work on Mac. Are there differences in the way the socket...
11
by: kshetgar | last post by:
I am experiencing a wierd problem... I have a C#.Net application Server which uses Sockets. It listens on port 11000. and it runs as a Windows Service. If I run it as a consple Application,...
25
by: bmearns | last post by:
Is it possible to specify which port to use as the outbound port on a connection? I have the IP address and port number for the computer I'm trying to connect to (not listening for), but it's...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.