Commit Graph
60 Commits
Author SHA1 Message Date
Martin 5aecac0f33 completes commit 4f3d21e46e 2011-12-29 15:38:58 +01:00
QuickJack 4f3d21e46e Fixes CS0168 in System.ServiceModel.dll 2011-12-29 15:28:26 +01:00
Atsushi Eno 0045240824 Enable environment-controled output on non-moon profile too. Add error logging. 2011-04-25 15:35:03 +09:00
Atsushi Eno a316b856d0 Get real fix for bug #687902. Revert request processor IDisposable.
and handle session shutdown when creating InstanceContext.
Also add note on DisposeInstance(), which got me stuck.
2011-04-20 19:11:34 +09:00
Atsushi Eno 5c306c5d04 Ongoing service channel closing fix and session management in ChannelDispatcher.
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.
2011-04-20 16:52:36 +09:00
Marek Habersack d4bb1c86b7 [wcf] make /js and /jsdebug dispatchers work.
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.
2010-10-20 15:04:37 +02:00
Atsushi Eno d46518eef2 2010-07-12 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : apply ErrorHandlers to IInputChannel too.


svn path=/trunk/mcs/; revision=160228
2010-07-12 09:43:24 +00:00
Atsushi Eno b177dfdc22 2010-07-09 Atsushi Enomoto <[email protected]>
* 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
2010-07-09 12:36:21 +00:00
Atsushi Eno e9f74b8a85 2010-07-08 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : support ErrorHandlers.


svn path=/trunk/mcs/; revision=160041
2010-07-08 10:30:40 +00:00
Atsushi Eno ab39e8acac 2010-07-05 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs :
	  moved IChannelDispatcherBoundListener from HttpChannelListener.cs.

	* SvcHttpHandler.cs : removed old code and #if blocks.

	* HttpStandaloneReplyChannel.cs
	  HttpStandaloneRequestContext.cs
	  HttpStandaloneChannelListener.cs
	  HttpReplyChannel.cs
	  HttpRequestContext.cs
	  HttpChannelListener.cs : renamed former 3 files to latter 3 files.

	* System.ServiceModel.dll.sources :
	  renamed new HTTP channel listener implementation sources, and
	  removed old sources.



svn path=/trunk/mcs/; revision=159913
2010-07-05 17:29:24 +00:00
Atsushi Eno b1be2aea6f 2010-06-24 Atsushi Enomoto <[email protected]>
* 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
2010-06-24 12:07:13 +00:00
Atsushi Eno 975c8846f8 2010-06-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : raise an error if IChannelListener is
	  already opened when it's opening.


svn path=/trunk/mcs/; revision=159267
2010-06-21 13:56:53 +00:00
Atsushi Eno d24448c5b9 2010-06-21 Atsushi Enomoto <[email protected]>
* ServiceThrottle.cs : take ChannelDispatcher to validate setters.

	* ServiceThrottlingBehavior.cs : pass channel dispatcher for .ctor.

	* ServiceHostBase.cs : remove extra throttling field.


svn path=/trunk/mcs/; revision=159232
2010-06-21 07:44:07 +00:00
Atsushi Eno 1f4684cd40 2010-06-17 Atsushi Enomoto <[email protected]>
* 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
2010-06-17 10:48:55 +00:00
Atsushi Eno 9e08c76462 2010-05-21 Atsushi Enomoto <[email protected]>
* 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
2010-05-21 09:16:37 +00:00
Atsushi Eno 79a9bcb766 2010-05-21 Atsushi Enomoto <[email protected]>
* 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
2010-05-21 04:48:10 +00:00
Atsushi Eno 277acc8496 2010-04-28 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : add workaround to set ChannelDispatcher
	  to IChannelListener. Avoid null ChannelDispatcher in http listener.

	* HttpChannelListener.cs, HttpListenerManager.cs :
	  Fix NRE issue in olive/samples/wcf/web-http-binding/samplesvc3.exe.


svn path=/trunk/mcs/; revision=156344
2010-04-28 16:25:01 +00:00
Atsushi Eno a286cc646c 2010-03-30 Atsushi Enomoto <[email protected]>
* 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
2010-03-30 10:28:51 +00:00
Atsushi Eno 3d135ccba1 2010-03-30 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : for faults, use fault namespace, not that of
	  ReplyAction. Added FIXME comment regarding dispatcher.


svn path=/trunk/mcs/; revision=154427
2010-03-30 07:35:56 +00:00
Atsushi Eno 0dcd75c5fc 2010-03-24 Atsushi Enomoto <[email protected]>
* 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
2010-03-24 07:12:29 +00:00
Atsushi Eno 5049788319 2010-03-24 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : fix wrong method call in open_delegate.
	  Patch by Matt Dargavel.


svn path=/trunk/mcs/; revision=154111
2010-03-24 06:07:09 +00:00
Atsushi Eno 93dc6116a5 2010-03-24 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : give the actual exception message instead
	  of "error occured".


svn path=/trunk/mcs/; revision=154110
2010-03-24 06:04:22 +00:00
Atsushi Eno dd3adaa509 2010-02-18 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : revert previous change - it could result
	  in blocking some threads and block nunit completion.


svn path=/trunk/mcs/; revision=151960
2010-02-18 08:20:36 +00:00
Atsushi Eno 6032fc1874 2010-02-04 Atsushi Enomoto <[email protected]>
* 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
2010-02-04 11:52:57 +00:00
Atsushi Eno fb89844a39 2010-01-25 Atsushi Enomoto <[email protected]>
* 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
2010-01-25 09:01:04 +00:00
Atsushi Eno 79c79e577b 2010-01-22 Atsushi Enomoto <[email protected]>
* 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
2010-01-22 08:18:19 +00:00
Atsushi Eno 47f6d5587c 2010-01-19 Atsushi Enomoto <[email protected]>
* 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
2010-01-19 10:15:25 +00:00
Atsushi Eno 3626d9fdcd 2010-01-07 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : make sure to unlock channel acceptor wait
	  handle when the delegated method resulted in an error.


svn path=/trunk/mcs/; revision=149162
2010-01-07 08:25:51 +00:00
Atsushi Eno 577d5f7da8 2009-12-26 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : close such channels that failed to receive
	  request or input.


svn path=/trunk/mcs/; revision=148902
2009-12-26 08:55:21 +00:00
Atsushi Eno 07d0ed89df 2009-12-07 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : fix regression; ServiceBehaviorAttribute
	  could be set explicitly null.


svn path=/trunk/mcs/; revision=147782
2009-12-07 15:50:08 +00:00
Atsushi Eno 0c9426582b 2009-12-07 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : handle AddressFilterMode (.Any only yet).
	* OperationInvokerHandler.cs : fix wrong IAsyncResult use.


svn path=/trunk/mcs/; revision=147781
2009-12-07 15:40:13 +00:00
Atsushi Eno 9f41ecccde 2009-10-22 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : disable concurrent channel acceptance
	  until it gets working fine.


svn path=/trunk/mcs/; revision=144657
2009-10-22 18:08:45 +00:00
Atsushi Eno be14cb07f3 2009-10-16 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : fix warnings.


svn path=/trunk/mcs/; revision=144260
2009-10-16 11:23:34 +00:00
Atsushi Eno e4fe97dc46 2009-10-09 Atsushi Enomoto <[email protected]>
* 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
2009-10-09 07:30:39 +00:00
Atsushi Eno 487b8d3e04 2009-10-05 Atsushi Enomoto <[email protected]>
* 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
2009-10-05 18:18:32 +00:00
Atsushi Eno e3f4a64baf 2009-09-17 Atsushi Enomoto <[email protected]>
* 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
2009-09-17 17:58:15 +00:00
Atsushi Eno f6f60a7e50 2009-09-16 Atsushi Enomoto <[email protected]>
* 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
2009-09-16 05:02:42 +00:00
Atsushi Eno baff9c75c8 2009-09-14 Atsushi Enomoto <[email protected]>
* 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
2009-09-14 09:03:15 +00:00
Atsushi Eno db820aa7c6 2009-09-04 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : remove obsoleted method.


svn path=/trunk/mcs/; revision=141314
2009-09-04 10:41:45 +00:00
Atsushi Eno c3995f0e2f 2009-08-24 Atsushi Enomoto <[email protected]>
* EndpointDispatcher.cs, ChannelDispatcher.cs : differentiate
	  service dispatch and callback client dispatch at initialization.


svn path=/trunk/mcs/; revision=140475
2009-08-24 08:50:05 +00:00
Atsushi Eno d577a89aa2 2009-08-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : also made reference to host optional.


svn path=/trunk/mcs/; revision=140406
2009-08-21 08:26:28 +00:00
Atsushi Eno 5678390b82 2009-08-21 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : isolated loop manager class from parent,
	  as well as moved some code from parent.


svn path=/trunk/mcs/; revision=140405
2009-08-21 08:25:23 +00:00
Atsushi Eno 6ac70127d7 2009-08-21 Atsushi Enomoto <[email protected]>
* 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
2009-08-21 06:35:21 +00:00
Atsushi Eno c78338f2fb 2009-08-20 Atsushi Enomoto <[email protected]>
* ServiceHostBase.cs : support UnknownMessageReceived (used by
	  ChannelDispatcher).

	* ChannelDispatcher.cs : handle unknown message in host event.


svn path=/trunk/mcs/; revision=140324
2009-08-20 10:48:11 +00:00
Atsushi Eno 0e567db131 2009-08-14 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : EndpointNotFoundException message could
	  be a bit kindful.


svn path=/trunk/mcs/; revision=139911
2009-08-14 12:35:24 +00:00
Atsushi Eno 4bd222cfb5 2009-07-31 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : raise error on multiple endpoint match
	  (documented at EndpointDispatcher.FilterPriority).


svn path=/trunk/mcs/; revision=139194
2009-07-31 16:10:27 +00:00
Atsushi Eno d50ee44924 2009-07-28 Atsushi Enomoto <[email protected]>
* 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
2009-07-29 19:02:40 +00:00
Atsushi Eno 8b8a21d6c0 2009-07-02 Atsushi Enomoto <[email protected]>
* ChannelDispatcher.cs : when service instance is provided to the
	  ServiceHost, do not reject Type-less state.


svn path=/trunk/mcs/; revision=137266
2009-07-02 10:29:59 +00:00
Atsushi Eno 166e408ef7 2009-06-29 Atsushi Enomoto <[email protected]>
* 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
2009-06-29 17:08:50 +00:00
Atsushi Eno 1628f04de5 2009-06-25 Atsushi Enomoto <[email protected]>
* 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
2009-06-25 18:37:22 +00:00