* WCF: ChannelDispatcher/ListenerLoopManager.Setup validate InstanceProvider, not InstanceContextProvider
- the creation of endpoints requires an instance provider or a default constructor
- InstanceProvider vs InstanceContextProvider was obviously a typo
* include InstanceContextProvider for validation as before
- two unittests failed due InstanceProvider is null and ed.DispatchRuntime has not type set
- comment for the validation is not useful anyway (It is tested at Open(), but strangely it is not instantiated at this point.)
In certain cases of having concurrent WCF requests
HttpReplyChannel.TryReceiveRequest can return true with the context
being null ("at closing phase").
This patch prevents crashing the whole application with a
NullReferenceException as reported in issue #7134.
Whether this is just covering the issue over or a real fix is yet to be
determined.
Fixes https://github.com/mono/mono/issues/7134
This showed up when switching to nunit-lite since it runs all tests in the same AppDomain,
meaning it won't exit when any foreground threads are still running. This was the case
with the thread created by ChannelDispatcher which was still waiting on a connection.
Also try to Join() the thread for a bit so it exits gracefully before trying to abort,
might resolve issues like in https://github.com/mono/mono/pull/3819
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