1

I'm pretty inexperienced in Remoting. I'm trying to use it and keep receiving WinSock error 10048 when opening TcpChannel.

I use the simplest code from MSDN:

    TcpChannel serverChannel = new TcpChannel(9090);
    ChannelServices.RegisterChannel(serverChannel);
    RemotingConfiguration.RegisterWellKnownServiceType(
        typeof(RemoteObject), "RemoteObject.rem", 
        WellKnownObjectMode.Singleton);

When ran for the first time, it work and quit correctly, but for second and so on I keep receiving error 10048, like socket 9090 is already in use. Netstat -a do not show port 9090 at all, like it was closed already.

What am I doing wrong?

4

4 回答 4

1

Prior to asking here I've spent four days trying to solve this, and already here's an answer: it's just WinSock in Windows XP was corrupted.

Two simple Windows commands solved the problem:

netsh int ip reset resetlog.txt

netsh winsock reset

于 2009-01-19T00:43:34.790 回答
0

Error 10048 corresponds to WSAEADDRINUSE, which means that the address is in use already. From what I can tell, it would most likely mean that port 9090 is already taken by another application.

于 2009-01-19T02:12:26.887 回答
0

Yes, of course. Problem was that there wasn't any applications using that port (at least visible by netstat). I've tried many other ports like 39000, 9095 and so on, with exactly same results.

于 2009-01-19T02:17:07.220 回答
0

我怀疑 ISA Server Firewall Client 有时可能会导致这种行为。

于 2009-05-09T14:43:56.987 回答