From: Atsushi Eno Date: Thu, 21 May 2015 17:23:27 +0000 (+0800) Subject: [WCF] bonus, NET_2_1 is blocking set_Timeout. It didn't exist in Moonlight. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=63a8b865f716f480f282bec5a0aac830016e64c8;p=mono.git [WCF] bonus, NET_2_1 is blocking set_Timeout. It didn't exist in Moonlight. --- diff --git a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs index 1eed451b7c2..19faf78c143 100644 --- a/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs +++ b/mcs/class/System.ServiceModel/System.ServiceModel.Channels/HttpRequestChannel.cs @@ -125,9 +125,7 @@ namespace System.ServiceModel.Channels //web_request.UseDefaultCredentials = false; } -#if !NET_2_1 // FIXME: implement this to not depend on Timeout property web_request.Timeout = (int) timeout.TotalMilliseconds; -#endif // There is no SOAP Action/To header when AddressingVersion is None. if (message.Version.Envelope.Equals (EnvelopeVersion.Soap11) || @@ -190,6 +188,7 @@ namespace System.ServiceModel.Channels if (hp.SuppressEntityBody) suppressEntityBody = true; } + #if !NET_2_1 if (source.ClientCredentials != null) { var cred = source.ClientCredentials; @@ -205,9 +204,7 @@ namespace System.ServiceModel.Channels if (buffer.Length > int.MaxValue) throw new InvalidOperationException ("The argument message is too large."); -#if !NET_2_1 web_request.ContentLength = (int) buffer.Length; -#endif web_request.BeginGetRequestStream (delegate (IAsyncResult r) { try { @@ -217,9 +214,7 @@ namespace System.ServiceModel.Channels web_request.BeginGetResponse (GotResponse, result); } catch (WebException ex) { switch (ex.Status) { -#if !NET_2_1 case WebExceptionStatus.NameResolutionFailure: -#endif case WebExceptionStatus.ConnectFailure: result.Complete (new EndpointNotFoundException (new EndpointNotFoundException ().Message, ex)); break;