From fcbdb548187c2006c31f7ae62b2418657c660803 Mon Sep 17 00:00:00 2001 From: hartaa Date: Tue, 6 May 2014 13:53:41 -0600 Subject: [PATCH] Added conditional compilation directive around setting the HttpWebRequest PreAuthenicate property for windows phone and silverlight. This property is not supported in either. --- RestSharp/Http.Async.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RestSharp/Http.Async.cs b/RestSharp/Http.Async.cs index 50999f349..9d1c5f867 100644 --- a/RestSharp/Http.Async.cs +++ b/RestSharp/Http.Async.cs @@ -379,8 +379,10 @@ private HttpWebRequest ConfigureAsyncWebRequest(string method, Uri url) #if !PocketPC webRequest.UseDefaultCredentials = UseDefaultCredentials; #endif - webRequest.PreAuthenticate = PreAuthenticate; +#if !WINDOWS_PHONE && !SILVERLIGHT + webRequest.PreAuthenticate = PreAuthenticate; +#endif AppendHeaders(webRequest); AppendCookies(webRequest);