diff --git a/CORESubscriber/Changelog.cs b/CORESubscriber/Changelog.cs index 5fbf2e2..fb0122f 100644 --- a/CORESubscriber/Changelog.cs +++ b/CORESubscriber/Changelog.cs @@ -105,7 +105,7 @@ private static XDocument SetTransactionValues(XElement transaction) var xTransaction = new XDocument(transaction); - File.WriteAllText($"{Config.DownloadFolder}\\lastTransaction.xml", xTransaction.ToString()); + File.WriteAllText($"{Config.DownloadFolder}/lastTransaction.xml", xTransaction.ToString()); return xTransaction; } @@ -168,7 +168,7 @@ private static string GetChangelogFileNameFromDownloadUrl(string downloadUrl) private static HttpResponseMessage GetResult(string downloadUrl) { - using (var client = SetCredentials(new HttpClient())) return client.GetAsync(downloadUrl).Result; + using (var client = SetCredentials(new HttpClient())) return client.GetAsync(downloadUrl, HttpCompletionOption.ResponseHeadersRead).Result; } private static HttpClient SetCredentials(HttpClient client) diff --git a/CORESubscriber/SoapAction/GetChangelog.cs b/CORESubscriber/SoapAction/GetChangelog.cs index 292da6f..37ca7ee 100644 --- a/CORESubscriber/SoapAction/GetChangelog.cs +++ b/CORESubscriber/SoapAction/GetChangelog.cs @@ -11,7 +11,7 @@ public static string Run() getChangelog.Descendants(Provider.GeosynchronizationNamespace + XmlAttributes.ChangelogId.LocalName).First() .Value = - Dataset.OrderedChangelogId.ToString(); + Dataset.OrderedChangelogId; var responseContent = SoapRequest.Send(SoapActions.GetChangelog, getChangelog); diff --git a/CORESubscriber/SoapAction/SoapRequest.cs b/CORESubscriber/SoapAction/SoapRequest.cs index c067580..225183e 100644 --- a/CORESubscriber/SoapAction/SoapRequest.cs +++ b/CORESubscriber/SoapAction/SoapRequest.cs @@ -3,6 +3,7 @@ using System.Net.Http; using System.Net.Http.Headers; using System.Text; +using System.Threading; using System.Xml.Linq; using CORESubscriber.Xml; @@ -37,7 +38,10 @@ private static HttpClient GetClient() { var byteArray = Encoding.ASCII.GetBytes(Provider.User + ":" + Provider.Password); - var client = new HttpClient(); + var client = new HttpClient + { + Timeout = Timeout.InfiniteTimeSpan + }; client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue("Basic", Convert.ToBase64String(byteArray));