views:

66

answers:

1

I get error 10013. msdn says its a permission denied error.

An attempt was made to access a socket in a way forbidden by its access permissions

My app ran fine. I then made a code change and restarted it. I got that error. I suspected i have to reuse ports so i wrote this in and still had no luck

server.Server.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, 1);

How do i solve this error?

-edit-

I did notice if i close FireFox (with its many tabs) and run the program it works... Maybe it has something to do with a connection? (i had ajax communicate with it). I wonder what did it.

A: 

This error code is caused by attempting to bind to a port that is exclusively in use by another process. The most common cause is accidentally starting the same service twice.

If in doubt, a quick check of netstat -a TCPView should reveal which process has the port open.

Stephen Cleary
I see the list of local/remote ips and ports (along with state) but i dont see any process name.
acidzombie24
I still cant tell what is happening. It feels like my winform app still is binding the address but it shouldnt be. NOTE: half the time i hard kill it.
acidzombie24
Sorry, that should have been TCPView, not netstat; answer has been updated. What port are you binding to?
Stephen Cleary