only one usage of each socket address is normally permitted?

B

Beemer Biker

I have an app that binds to 5003 and 5004. It works fine on a desktop
VS2005/sp1 dotnet 2. It will not run on a laptop VS2005/sp1 dotnet 2 giving
the above error on the very first bind.

I cannot spot what is causing the problem. There is something different
about the laptop no? Both system have xp, sp2 with latest patches and
firewall off. The program should behave the same. I start guessing and
disable spampal, snagit, whatever I can think of but I still cant bind nor
see what is causing the program to fail.

I set a breakpoint at the first bind and examine thecontents of
"audioEndPoint" and sure enough something is different. On the desktop I
see "m_address" and "m_port" listed in the watch window. They are missing
in the laptop but if I expand [+]Non-Public members then I see those two
variables. I would think that since both VS2005 with SP1 and DX90SDK (same
december) one would see the exact layout on each. I do not see the
corresponding [+]Public Members but both system do show [+]Static members.
Maybe that is not significent.

Could port 5002 and 5003 be un-available on my laptop?

The desktop is on a "domain" but the laptop isnt. Could this be a security
policy problem? If anything, I would think that the desktop beiing on a
domain might have a more restrictive security policy. FWIW, the laptop has
wireless.
 
I

Ivar Lumi

Hi,

Before running program ensure that ports are free.

Run -> type: cmd -> enter
you see command prompt
type:
netstat /a

you see all ports used.
 
B

Beemer Biker

Ivar Lumi said:
Hi,

Before running program ensure that ports are free.

Run -> type: cmd -> enter
you see command prompt
type:
netstat /a

you see all ports used.

Thanks, I was unaware that netstat had all those options. By the time I
read your suggestion, it was all working. I cannot account for this
except that the laptop was shutdown and started back up. There were some
pending security updates that required a reboot and when it booted up I no
longer got that message when I ran my program. Sometimes exiting the
debugger without closing the debugged program can cause problems. It is
clear that 5003 and 5004 are released when the program exits and I was able
to verify that using netstat -p. Maybe they were not release when the
debugger terminated the progam? Maybe I just had to do a periodic reboot
like that mac/windows commercial on TV ;-)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top