It is part of bugfix 687902.
To get the bug fixed, the new "using" sections in ChannelDispatcher.cs to
explicitly dispose channels. But this causes regression in PerSession-based
tests. So some new session management code is (likely) required as well.
It will also alter "mixed" MaxConcurrentCalls and MaxConcurrentSessions with
correct management code.
There were several issues here:
- The IChannelDispatcherBoundListener was defined twice, in two different namespaces, and it caused code in
ChannelDispatcher.Attach not to set its associated listener's ChannelDispatcher property to the correct value.
This, in turn, caused incorrect HttpListenerManagerTable operation, where it would put the "/js" and "/jsdebug"
dispatchers in separate HttpListenerManagers, instead of in the main (base) service's one.
- After fixing the above, it turned out that SvcHttpHandler selected the manager based on the host's base address,
when it should first try to find one whose URL matches the current request exactly.
* ChannelDispatcher.cs : do not swallow exception during
RequestContext.get_RequestMessage() and thus return SOAP Fault for
MessageSecurityException to the client.
svn path=/trunk/mcs/; revision=160122
* HttpTransportBindingElement.cs :
Use new HTTP channel listener implementation.
* ChannelDispatcher.cs : enable service throttling again.
This time Http(Listener), ASP.NET and TCP listeners all work.
* System.ServiceModel.dll.sources :
add new HTTP channel listener implementation sources.
Old sources will be kept for a while, won't entirely vanish as
ASP.NET support will live there.
svn path=/trunk/mcs/; revision=159491
* ServiceHostBase.cs : retrieve MessageVersion and raise an error
if there is none. (Check this earlier than building a listener.)
* ChannelDispatcher.cs : MessageVersion check is moved to
ServiceHostBase.
* ServiceMetadataExtension.cs : overwrite MessageVersion to use None.
(The only special case I found for ChannelDispatcher.MessageVersion.)
* CustomBindingTest.cs : add tests for MessageVersion check on Open().
* MetadataExchangeBindingsTest.cs : make sure that special casing of
MessageVersion does not happen at this layer.
svn path=/trunk/mcs/; revision=159061
* ChannelDispatcher.cs : disable slottling again :( It still fails
to process concurrent requests if there is service metadata channel
and MaxConcurrentSessions > 1 on non-ASP.NET channels.
svn path=/trunk/mcs/; revision=157670
* ChannelDispatcher.cs : enable throttling again. Though issues
regarding parallel request is not here (multiple dispatchers
can accept a channels for each), and HTTP channels do not accept
more than one channel at a time anyways.
svn path=/trunk/mcs/; revision=157662
* ChannelDispatcher.cs : differentiate EndpointNotFound and
ActionNotSupported so that FaultConverter can create appropriate
fault messages. Removed extra filter condition on null To item.
And create fault messages on *any* server side error, do not let
request client infinitely wait for the response until timeout.
(RunDestinationUnreachableTest() is still not working but it works
when it is SOAP 1.2.)
svn path=/trunk/mcs/; revision=154439
* ChannelDispatcher.cs : for faults, use fault namespace, not that of
ReplyAction. Added FIXME comment regarding dispatcher.
svn path=/trunk/mcs/; revision=154427
* ChannelDispatcher.cs : return EndpointDispatcher at initializing
for internal use. Add some locks. Patch by Matt Dargavel.
* ServiceHostBase.cs : if there is an existing ChannelDispatcher
for the same endpoint URI, reuse it. Patch by Matt Dargavel.
svn path=/trunk/mcs/; revision=154114
* ChannelDispatcher.cs : revert previous change - it could result
in blocking some threads and block nunit completion.
svn path=/trunk/mcs/; revision=151960
* ChannelDispatcher.cs : now I can enable service throttling to
handle more than one concurrent channels as ASP.NET reply channel
got fixed.
* HTTP_listener_notes.txt: Fixed some wrong description, simplified
some, and updated some.
svn path=/trunk/mcs/; revision=150851
* ChannelDispatcher.cs : actually instance context provider could be
null through the entire service run.
Fixed all current nunit failures!
svn path=/trunk/mcs/; revision=150110
* DuplexClientRuntimeChannel.cs : do not try to iterate channel
acceptor when it is being closed.
* ChannelDispatcher.cs : do not try to iterate channel acceptor when
it is being closed.
svn path=/trunk/mcs/; revision=150047
* CommunicationObject.cs : when process state changes, lock the
object to make sure the state transition is valid.
Change OnClosed/OnClosing to do the way OnOpened/OnOpening does.
* ChannelDispatcher.cs : another error audit.
svn path=/trunk/mcs/; revision=149793
* ChannelDispatcher.cs : make sure to unlock channel acceptor wait
handle when the delegated method resulted in an error.
svn path=/trunk/mcs/; revision=149162
* CommunicationObject.cs : OnOpening() and OnOpened() require calls
to base methods. This resulted in not a few changes everywhere.
* ChannelDispatcher.cs : OnOpened/OnOpening constraints related
changes were required here too. Actually it simplified code.
* InstanceContext.cs : new constraints on CommunicationObject
required calls to base methods.
* ChannelFactory.cs : ditto. Actually changed timing to call
Open() on the internal factory.
* ServiceHostBase.cs : removed DoOpen() which is almost extra now.
Added temporary IMetadataExchange workaround.
svn path=/trunk/mcs/; revision=143829
* ChannelDispatcher.cs : make sure to close, *and* abort channels
in case they failed to close. Also consider close timeouts.
Rename a field to make less confusing.
svn path=/trunk/mcs/; revision=143431
* ChannelDispatcher.cs, EndpointDispatcher.cs :
when an EndpointDispatcher is added to ChannelDispatcher, its
ChannelDispatcher property is automatically filled. To do this,
create a derived collection type for Endpoints (that's what .NET
does). Remove extra InitializeEndpoint() argument.
* DuplexClientRuntimeChannel.cs : reflecting EndpointDispatcher change.
* ChannelDispatcherTest.cs : add a test to make sure that
EndpointDispatcher.ChannelDispatcher property is filled by Add().
svn path=/trunk/mcs/; revision=142124
* ChannelDispatcher.cs : make sure to close the request context,
some channels such as http keeps opening it. Patch by Levi Bard.
Fixed bug #533776.
svn path=/trunk/mcs/; revision=142008
* ChannelDispatcher.cs : do not try to wait for channel closer
handle when the loop is not started yet. This fixes lengthy wait
in the nunit tests.
svn path=/trunk/mcs/; revision=141881
* ChannelDispatcher.cs, EndpointDispatcher.cs :
moved some initialization code from ServiceHostBase, to start
reducing dependencies on ServiceHostBase.
* ServiceHostBase.cs : moved some code to channel/endpoint dispatcher
to reduce their dependencies on this type.
svn path=/trunk/mcs/; revision=140401
* ChannelDispatcher.cs : raise error on multiple endpoint match
(documented at EndpointDispatcher.FilterPriority).
svn path=/trunk/mcs/; revision=139194
* TcpChannelListener.cs : to avoid creating two or more channels
for one remote endpoint, check existing remote endpoints and
ignore such connections (it must be handled in different thread
fired by ChannelDispatcher loop).
* ChannelDispatcher.cs : move Open() inside acceptor lock, so that
the channel does not have to be fired Receive() before Open().
svn path=/trunk/mcs/; revision=138986
* ChannelDispatcher.cs : do not iterate extra channel acceptance
and hence close channels a bit more gracefully.
* TcpDuplexSessionChannel.cs : on Abort(), do just Close() within
(almost) no time.
* TcpChannelListener.cs : accept multiple channels at a time.
svn path=/trunk/mcs/; revision=137093
* ChannelDispatcher.cs : instead of discarding channels, reuse them
unless it is closed by session manager (session manager does not
work, so channels are not actually closed automatically yet).
svn path=/trunk/mcs/; revision=136866