Bug 277 - Net.Tcp Port Sharing doesn't seem to work.
Summary: Net.Tcp Port Sharing doesn't seem to work.
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: master
Hardware: PC Linux
: --- minor
Target Milestone: Untriaged
Assignee: Bugzilla
Depends on:
Reported: 2011-08-12 03:39 UTC by Stephen Kou
Modified: 2011-08-13 06:07 UTC (History)
2 users (show)

See Also:
Tags: net.tcp, wcf, port sharing
Is this bug a regression?: ---
Last known good build:

Repro testcase (836 bytes, text/plain)
2011-08-13 06:07 UTC, Stephen Kou

Description Stephen Kou 2011-08-12 03:39:49 UTC
On MS.NET, you can have multiple service endpoints under a <service> all listening on the same port.  I believe you can even have endpoints on different services listening on the same port, but the former scenario was what I tested.

Mono throws an exception when it tries to set up what I presume to be the second endpoint, claiming the address is already in use.

I presume it's going to be quite a bit of work to set up port sharing (since it seems each channel is given its own TcpListener), so i'm goign to put this lower priority.
Comment 1 Miguel de Icaza [MSFT] 2011-08-12 17:11:17 UTC
Is this using XSP, mod_mono or hosting your own service?

Could you provide us with a self-contained test case, so we can look at the exact code you want fixed?
Comment 2 Stephen Kou 2011-08-13 06:07:54 UTC
Created attachment 120 [details]
Repro testcase

the following code allows two service endpoints to share the same port.  It works fine on windows/ms.net, using mono's compiled binaries.  On mono itself, the initialization dies with "Address already in use" exception.

Note You need to log in before you can comment on or make changes to this bug.