2009-07-02 Atsushi Enomoto <atsushi@ximian.com>
[mono.git] / mcs / class / System.ServiceModel / System.ServiceModel.Dispatcher / ChannelDispatcher.cs
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 ();
                        }