개정판 6a19b48d
issue #00000 페이지 이미지 download 로직 수정
Change-Id: I4da03c36b5a135eea80b57b20ada38239afd1082
KCOM/App.xaml.cs | ||
---|---|---|
7 | 7 |
using System.ComponentModel; |
8 | 8 |
using System.IO; |
9 | 9 |
using System.Linq; |
10 |
using System.Net; |
|
10 | 11 |
using System.ServiceModel; |
11 | 12 |
using System.Threading.Tasks; |
12 | 13 |
using System.Windows; |
... | ... | |
34 | 35 |
public static string MarkusVersion = ""; |
35 | 36 |
public static string BaseAddress; |
36 | 37 |
public static string FileUploadUri; |
37 |
public static BasicHttpBinding _binding;
|
|
38 |
public static System.ServiceModel.Channels.Binding _binding;
|
|
38 | 39 |
public static EndpointAddress _EndPoint; |
39 | 40 |
public static EndpointAddress _EndPoint_SaveLoad; |
40 | 41 |
public static EndpointAddress _EndPoint_Symbol; |
... | ... | |
236 | 237 |
//_binding.CloseTimeout = new TimeSpan(0, 5, 0); |
237 | 238 |
//_binding.SendTimeout = new TimeSpan(0, 5, 0); |
238 | 239 |
|
239 |
_binding = new BasicHttpBinding(BasicHttpSecurityMode.TransportCredentialOnly); |
|
240 |
_binding.MaxBufferSize = 2147483647; |
|
241 |
_binding.MaxReceivedMessageSize = 2147483647; |
|
242 |
_binding.OpenTimeout = new TimeSpan(0, 10, 0); |
|
243 |
_binding.ReceiveTimeout = new TimeSpan(0, 10, 0); |
|
244 |
_binding.CloseTimeout = new TimeSpan(0, 10, 0); |
|
245 |
_binding.SendTimeout = new TimeSpan(0, 10, 0); |
|
246 |
_binding.TextEncoding = System.Text.Encoding.UTF8; |
|
247 |
_binding.TransferMode = TransferMode.Buffered; |
|
248 |
//_binding.TextEncoding = System.Text.Encoding.UTF8; |
|
240 |
#region 기본 binding |
|
241 |
BasicHttpBinding basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.None); |
|
242 |
basicHttpBinding.Security = new BasicHttpSecurity { Transport = new HttpTransportSecurity { ClientCredentialType = HttpClientCredentialType.None, ProxyCredentialType = HttpProxyCredentialType.None }, Mode = BasicHttpSecurityMode.None, Message = new BasicHttpMessageSecurity { AlgorithmSuite = System.ServiceModel.Security.SecurityAlgorithmSuite.Basic256, ClientCredentialType = BasicHttpMessageCredentialType.UserName } }; |
|
243 |
basicHttpBinding.MaxBufferSize = 2147483647; |
|
244 |
basicHttpBinding.MaxBufferPoolSize = 2147483647; |
|
245 |
basicHttpBinding.MaxReceivedMessageSize = 2147483647; |
|
246 |
basicHttpBinding.OpenTimeout = new TimeSpan(0, 30, 0); |
|
247 |
basicHttpBinding.ReceiveTimeout = new TimeSpan(4, 30, 0); |
|
248 |
basicHttpBinding.CloseTimeout = new TimeSpan(0, 30, 0); |
|
249 |
basicHttpBinding.SendTimeout = new TimeSpan(4, 30, 0); |
|
250 |
basicHttpBinding.TextEncoding = System.Text.Encoding.UTF8; |
|
251 |
basicHttpBinding.TransferMode = TransferMode.Buffered; |
|
252 |
basicHttpBinding.MessageEncoding = WSMessageEncoding.Text; |
|
253 |
basicHttpBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard; |
|
254 |
basicHttpBinding.AllowCookies = false; |
|
255 |
basicHttpBinding.BypassProxyOnLocal = false; |
|
256 |
//basicHttpBinding.UseDefaultWebProxy = false; |
|
257 |
//basicHttpBinding.ProxyAddress = new Uri("Http://localhost:8888"); |
|
258 |
|
|
259 |
_binding = basicHttpBinding; |
|
260 |
|
|
261 |
#endregion |
|
262 |
|
|
263 |
#region custombinding |
|
264 |
//var customBinding = new System.ServiceModel.Channels.CustomBinding() |
|
265 |
//{ |
|
266 |
// OpenTimeout = new TimeSpan(0, 15, 0), |
|
267 |
// ReceiveTimeout = new TimeSpan(0, 15, 0), |
|
268 |
// CloseTimeout = new TimeSpan(0, 15, 0), |
|
269 |
// SendTimeout = new TimeSpan(0, 15, 0), |
|
270 |
//}; |
|
271 |
|
|
272 |
//var messageEncoding = new WcfExtensions.ServiceModel.Channels.CompressionBindingElement(); |
|
273 |
//messageEncoding.Level = WcfExtensions.ServiceModel.Channels.CompressionLevel.Fast; |
|
274 |
|
|
275 |
//var httpTranport = new System.ServiceModel.Channels.HttpTransportBindingElement |
|
276 |
//{ |
|
277 |
// MaxBufferPoolSize = Int32.MaxValue, |
|
278 |
// MaxBufferSize = Int32.MaxValue, |
|
279 |
// MaxReceivedMessageSize = Int32.MaxValue, |
|
280 |
// RequestInitializationTimeout = new TimeSpan(0, 10, 0), |
|
281 |
// UseDefaultWebProxy = false, |
|
282 |
// ProxyAddress = new Uri("Http://127.0.0.1:8888") |
|
283 |
//}; |
|
284 |
|
|
285 |
|
|
286 |
//customBinding.CreateBindingElements(); |
|
287 |
//customBinding.Elements.Add(messageEncoding); |
|
288 |
//customBinding.Elements.Add(httpTranport); |
|
289 |
|
|
290 |
|
|
291 |
//_binding = customBinding; |
|
292 |
#endregion |
|
293 |
|
|
249 | 294 |
//Support.SetLicense(); |
250 | 295 |
|
251 | 296 |
#if DEBUG |
... | ... | |
255 | 300 |
#else |
256 | 301 |
BaseAddress = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal); |
257 | 302 |
#endif |
258 |
|
|
303 |
|
|
259 | 304 |
var UploadAddress = CommonLib.Common.GetConfigString("KCOM_kr_co_devdoftech_cloud_FileUpload", "URL", ""); |
260 | 305 |
|
261 | 306 |
if (!string.IsNullOrWhiteSpace(UploadAddress) && !string.IsNullOrWhiteSpace(BaseAddress)) |
262 | 307 |
{ |
263 |
var uri = new UriBuilder(UploadAddress); |
|
308 |
var uploadUri = new UriBuilder(UploadAddress);
|
|
264 | 309 |
var baseUri = new UriBuilder(BaseAddress); |
265 | 310 |
|
266 |
uri.Host = baseUri.Host; |
|
267 |
uri.Port = baseUri.Port; |
|
268 |
|
|
269 |
FileUploadUri = uri.ToString(); |
|
270 |
|
|
311 |
uploadUri.Host = baseUri.Host; |
|
312 |
uploadUri.Port = baseUri.Port; |
|
271 | 313 |
|
314 |
FileUploadUri = uploadUri.ToString(); |
|
272 | 315 |
} |
273 | 316 |
|
274 |
App.FileLogger.Debug(string.Format("{0}/ServiceDeepView.svc", BaseAddress)); |
|
317 |
App.FileLogger.Debug(string.Format("{0}/ServiceDeepView.svc/gzip", BaseAddress));
|
|
275 | 318 |
_EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", BaseAddress)); |
319 |
|
|
276 | 320 |
#if !DEBUG |
277 | 321 |
#endif |
278 | 322 |
//var license = new License.Validator.Valid(BaseAddress + "/License"); |
내보내기 Unified diff