2009-07-02 Atsushi Enomoto <atsushi@ximian.com>
authorAtsushi Eno <atsushieno@gmail.com>
Thu, 2 Jul 2009 10:29:59 +0000 (10:29 -0000)
committerAtsushi Eno <atsushieno@gmail.com>
Thu, 2 Jul 2009 10:29:59 +0000 (10:29 -0000)
* ChannelDispatcher.cs : when service instance is provided to the
  ServiceHost, do not reject Type-less state.

svn path=/trunk/mcs/; revision=137266

mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChangeLog
mcs/class/System.ServiceModel/System.ServiceModel.Dispatcher/ChannelDispatcher.cs

index 84d20bafeb06784ae5de12e2630b68abe1a0d55a..567f2f60a4d6c99933d5f3d4a2509c42d42d2d42 100644 (file)
@@ -1,3 +1,8 @@
+2009-07-02  Atsushi Enomoto  <atsushi@ximian.com>
+
+       * ChannelDispatcher.cs : when service instance is provided to the
+         ServiceHost, do not reject Type-less state.
+
 2009-06-29  Atsushi Enomoto  <atsushi@ximian.com>
 
        * ChannelDispatcher.cs : do not iterate extra channel acceptance
index ce29c9341bdbcfee4d6c40c9d8e5720df27f6f85..cd759ed073fbdd5ccdf72258039a60f1f83fa34b 100644 (file)
@@ -312,7 +312,7 @@ namespace System.ServiceModel.Dispatcher
 
                                // It is tested at Open(), but strangely it is not instantiated at this point.
                                foreach (var ed in owner.Endpoints)
-                                       if (ed.DispatchRuntime.Type == null || ed.DispatchRuntime.Type.GetConstructor (Type.EmptyTypes) == null)
+                                       if (ed.DispatchRuntime.InstanceContextProvider == null && (ed.DispatchRuntime.Type == null || ed.DispatchRuntime.Type.GetConstructor (Type.EmptyTypes) == null))
                                                throw new InvalidOperationException ("There is no default constructor for the service Type in the DispatchRuntime");
                                SetupChannelAcceptor ();
                        }