프로젝트

일반

사용자정보

개정판 8cec2027

ID8cec2027dccb2db3cf26fa5008e9ee1938ee672b
상위 7f669d88
하위 5e98001b

백흠경이(가) 7달 전에 추가함

Fix: Binding 관련 코드 수정

Change-Id: I26a9ab0f5bdd4322c0c0e79f21e822f9a6be094d

차이점 보기:

KCOM/App.xaml.cs
186 186
                #endregion
187 187

  
188 188

  
189
                if (e.Args.Count() > 0)
189
                if (e.Args.Any())
190 190
                {
191 191
                    var result = ParamDecoding(e.Args[0].Replace(@"kcom://", "").Replace(@"/", ""));
192

  
193 192
#if DEBUG
194 193
                    /*
195 194
                    ViewerDataModel.Instance.IsDocumentHistory = true;
......
251 250
                    }
252 251
                }
253 252

  
254
                //App.ViewInfo.CreateFinalPDFPermission = false;
255
                //App.ViewInfo.NewCommentPermission = false;
256
                //GetQueryStringParameters();
257
                //_binding = new WSHttpBinding();
258
                //_binding.Security = new WSHttpSecurity { Transport = new HttpTransportSecurity { ClientCredentialType = HttpClientCredentialType.None }, Mode = SecurityMode.Transport };
259
                //_binding.MaxReceivedMessageSize = 2147483647;
260
                //_binding.OpenTimeout = new TimeSpan(0, 1, 0);
261
                //_binding.ReceiveTimeout = new TimeSpan(0, 10, 0);
262
                //_binding.CloseTimeout = new TimeSpan(0, 5, 0);
263
                //_binding.SendTimeout = new TimeSpan(0, 5, 0);
264
#if BASIC_BINDING
265

  
266
                #region 기본 binding
267
                BasicHttpBinding basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.None);
268
                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 } };
269
                basicHttpBinding.MaxBufferSize = 2147483647;
270
                basicHttpBinding.MaxBufferPoolSize = 2147483647;
271
                basicHttpBinding.MaxReceivedMessageSize = 2147483647;
272
                basicHttpBinding.OpenTimeout = new TimeSpan(4, 30, 0);
273
                basicHttpBinding.ReceiveTimeout = new TimeSpan(4, 30, 0);
274
                basicHttpBinding.CloseTimeout = new TimeSpan(4, 30, 0);
275
                basicHttpBinding.SendTimeout = new TimeSpan(4, 30, 0);
276
                basicHttpBinding.TextEncoding = System.Text.Encoding.UTF8;
277
                basicHttpBinding.TransferMode = TransferMode.Buffered;
278
                basicHttpBinding.MessageEncoding = WSMessageEncoding.Text;
279
                basicHttpBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
280

  
281

  
282
                //System.ServiceModel.Channels.ReliableSessionBindingElement reliableSession = new System.ServiceModel.Channels.ReliableSessionBindingElement();
283
                //reliableSession.Ordered = true;
284
                //reliableSession.MaxRetryCount = 3;
285
                //basicHttpBinding.CreateBindingElements().Add(reliableSession);
286
                //basicHttpBinding.ProxyAddress = null;
287
                //basicHttpBinding.AllowCookies = false;
288
                //basicHttpBinding.BypassProxyOnLocal = false;
289
                //basicHttpBinding.UseDefaultWebProxy = false;
290
                //basicHttpBinding.ProxyAddress = new Uri("Http://localhost:8888");
291

  
292
                _binding = basicHttpBinding;
293

  
294
                //System.ServiceModel.Channels.ReliableSessionBindingElement reliableSession = new System.ServiceModel.Channels.ReliableSessionBindingElement();
295
                //reliableSession.Ordered = true;
296

  
297
                //System.ServiceModel.Channels.HttpTransportBindingElement httpTransport = new System.ServiceModel.Channels.HttpTransportBindingElement();
298
                //httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous;
299
                //httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
300
                //System.ServiceModel.Channels.CustomBinding binding = new System.ServiceModel.Channels.CustomBinding(reliableSession, httpTransport);
301
                #endregion
302
#elif _CUSTOM_BINDING
303
                #region custombinding
304
                var customBinding = new System.ServiceModel.Channels.CustomBinding()
305
                {
306
                    OpenTimeout = new TimeSpan(0, 30, 0),
307
                    ReceiveTimeout = new TimeSpan(0, 30, 0),
308
                    CloseTimeout = new TimeSpan(0, 30, 0),
309
                    SendTimeout = new TimeSpan(0, 30, 0),
310
                };
311

  
312
                //var messageEncoding = new WcfExtensions.ServiceModel.Channels.CompressionBindingElement();
313
                //messageEncoding.Level = WcfExtensions.ServiceModel.Channels.CompressionLevel.Maximum;
314

  
315
                var httpTranport = new System.ServiceModel.Channels.HttpsTransportBindingElement
316
                {
317
                    MaxBufferPoolSize = Int32.MaxValue,
318
                    MaxBufferSize = Int32.MaxValue,
319
                    MaxReceivedMessageSize = Int32.MaxValue,
320
                    RequestInitializationTimeout = new TimeSpan(0, 30, 0),
321
                    //UseDefaultWebProxy = false,
322
                    //ProxyAddress = new Uri("Http://127.0.0.1:8888")
323
                };
324

  
325
                customBinding.CreateBindingElements();
326
                //customBinding.Elements.Add(messageEncoding);
327
                customBinding.Elements.Add(httpTranport);
328
           
329

  
330
                _binding = customBinding;
331
                #endregion
332

  
333
#elif CUSTOM_BINDING
334
                #region custombinding
335
                var customBinding = new System.ServiceModel.Channels.CustomBinding()
336
                {
337
                    OpenTimeout = new TimeSpan(0, 30, 0),
338
                    ReceiveTimeout = new TimeSpan(0, 30, 0),
339
                    CloseTimeout = new TimeSpan(0, 30, 0),
340
                    SendTimeout = new TimeSpan(0, 30, 0),
341
                };
342

  
343
                //var messageEncoding = new WcfExtensions.ServiceModel.Channels.CompressionBindingElement();
344
                //messageEncoding.Level = WcfExtensions.ServiceModel.Channels.CompressionLevel.Maximum;
253
                BaseAddress = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
254
                _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", BaseAddress));
345 255

  
346
                var httpTranport = new System.ServiceModel.Channels.HttpsTransportBindingElement
256
                if (_EndPoint.Uri.Scheme == Uri.UriSchemeHttps)
347 257
                {
348
                    MaxBufferPoolSize = Int32.MaxValue,
349
                    MaxBufferSize = Int32.MaxValue,
350
                    MaxReceivedMessageSize = Int32.MaxValue,
351
                    RequestInitializationTimeout = new TimeSpan(0, 30, 0),
352
                    //UseDefaultWebProxy = false,
353
                    //ProxyAddress = new Uri("Http://127.0.0.1:8888")
354
                };
258
                    #region custombinding
259
                    var customBinding = new System.ServiceModel.Channels.CustomBinding()
260
                    {
261
                        OpenTimeout = new TimeSpan(0, 30, 0),
262
                        ReceiveTimeout = new TimeSpan(0, 30, 0),
263
                        CloseTimeout = new TimeSpan(0, 30, 0),
264
                        SendTimeout = new TimeSpan(0, 30, 0),
265
                    };
355 266

  
356
                customBinding.CreateBindingElements();
267
                    //var messageEncoding = new WcfExtensions.ServiceModel.Channels.CompressionBindingElement();
268
                    //messageEncoding.Level = WcfExtensions.ServiceModel.Channels.CompressionLevel.Maximum;
357 269

  
358
                var reliableSession = new System.ServiceModel.Channels.ReliableSessionBindingElement();
359
                
360
                var encoding = new System.ServiceModel.Channels.TextMessageEncodingBindingElement
361
                {
362
                    MaxReadPoolSize = Int32.MaxValue,
363
                    MaxWritePoolSize = Int32.MaxValue,
364
                    MessageVersion = System.ServiceModel.Channels.MessageVersion.Soap12WSAddressing10,
365
                    WriteEncoding = System.Text.Encoding.UTF8,
366
                    ReaderQuotas = new System.Xml.XmlDictionaryReaderQuotas
270
                    var httpTranport = new System.ServiceModel.Channels.HttpsTransportBindingElement
367 271
                    {
368
                        MaxArrayLength = Int32.MaxValue,
369
                        MaxBytesPerRead = Int32.MaxValue,
370
                        MaxDepth = Int32.MaxValue,
371
                        MaxNameTableCharCount = Int32.MaxValue,
372
                        MaxStringContentLength = Int32.MaxValue
373
                    }
374
                };
375
                //reliableSession.Ordered = true; // Set other properties as needed
376
                customBinding.Elements.Add(reliableSession);
377
                //customBinding.Elements.Add(messageEncoding);
378
                //customBinding.Elements.Add(encoding);
379
                customBinding.Elements.Add(httpTranport);
380

  
381
                _binding = customBinding;
382
                #endregion
272
                        MaxBufferPoolSize = Int32.MaxValue,
273
                        MaxBufferSize = Int32.MaxValue,
274
                        MaxReceivedMessageSize = Int32.MaxValue,
275
                        RequestInitializationTimeout = new TimeSpan(0, 30, 0),
276
                        //UseDefaultWebProxy = false,
277
                        //ProxyAddress = new Uri("Http://127.0.0.1:8888")
278
                    };
383 279

  
384
#else
385

  
386
                #region 기본 binding
387
                //BasicHttpBinding basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.None);
388
                //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 } };
389
                //basicHttpBinding.MaxBufferSize = 2147483647;
390
                //basicHttpBinding.MaxBufferPoolSize = 2147483647;
391
                //basicHttpBinding.MaxReceivedMessageSize = 2147483647;
392
                //basicHttpBinding.OpenTimeout = new TimeSpan(4, 30, 0);
393
                //basicHttpBinding.ReceiveTimeout = new TimeSpan(4, 30, 0);
394
                //basicHttpBinding.CloseTimeout = new TimeSpan(4, 30, 0);
395
                //basicHttpBinding.SendTimeout = new TimeSpan(4, 30, 0);
396
                //basicHttpBinding.TextEncoding = System.Text.Encoding.UTF8;
397
                //basicHttpBinding.TransferMode = TransferMode.Buffered;
398
                //basicHttpBinding.MessageEncoding = WSMessageEncoding.Text;
399
                //basicHttpBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
400

  
401

  
402
                //System.ServiceModel.Channels.ReliableSessionBindingElement reliableSession = new System.ServiceModel.Channels.ReliableSessionBindingElement();
403
                //reliableSession.Ordered = true;
404
                //reliableSession.MaxRetryCount = 3;
405
                //basicHttpBinding.CreateBindingElements().Add(reliableSession);
406

  
407
                //_binding = basicHttpBinding;
408
                #endregion
409
#endif
280
                    customBinding.CreateBindingElements();
410 281

  
411
                //Support.SetLicense();
282
                    var reliableSession = new System.ServiceModel.Channels.ReliableSessionBindingElement();
412 283

  
413
#if DEBUG
414
                //sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
415
                System.Diagnostics.Debug.WriteLine("BaseServiceURL");
416
                BaseAddress = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
417
#else
418
                BaseAddress = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
419
#endif
284
                    var encoding = new System.ServiceModel.Channels.TextMessageEncodingBindingElement
285
                    {
286
                        MaxReadPoolSize = Int32.MaxValue,
287
                        MaxWritePoolSize = Int32.MaxValue,
288
                        MessageVersion = System.ServiceModel.Channels.MessageVersion.Soap12WSAddressing10,
289
                        WriteEncoding = System.Text.Encoding.UTF8,
290
                        ReaderQuotas = new System.Xml.XmlDictionaryReaderQuotas
291
                        {
292
                            MaxArrayLength = Int32.MaxValue,
293
                            MaxBytesPerRead = Int32.MaxValue,
294
                            MaxDepth = Int32.MaxValue,
295
                            MaxNameTableCharCount = Int32.MaxValue,
296
                            MaxStringContentLength = Int32.MaxValue
297
                        }
298
                    };
299
                    //reliableSession.Ordered = true; // Set other properties as needed
300
                    customBinding.Elements.Add(reliableSession);
301
                    //customBinding.Elements.Add(messageEncoding);
302
                    //customBinding.Elements.Add(encoding);
303
                    customBinding.Elements.Add(httpTranport);
304

  
305
                    _binding = customBinding;
306
                    #endregion
307
                }
308
                else
309
                {
310
                    #region 기본 binding
311
                    BasicHttpBinding basicHttpBinding = new BasicHttpBinding(BasicHttpSecurityMode.None);
312
                    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 } };
313
                    basicHttpBinding.MaxBufferSize = 2147483647;
314
                    basicHttpBinding.MaxBufferPoolSize = 2147483647;
315
                    basicHttpBinding.MaxReceivedMessageSize = 2147483647;
316
                    basicHttpBinding.OpenTimeout = new TimeSpan(4, 30, 0);
317
                    basicHttpBinding.ReceiveTimeout = new TimeSpan(4, 30, 0);
318
                    basicHttpBinding.CloseTimeout = new TimeSpan(4, 30, 0);
319
                    basicHttpBinding.SendTimeout = new TimeSpan(4, 30, 0);
320
                    basicHttpBinding.TextEncoding = System.Text.Encoding.UTF8;
321
                    basicHttpBinding.TransferMode = TransferMode.Buffered;
322
                    basicHttpBinding.MessageEncoding = WSMessageEncoding.Text;
323
                    basicHttpBinding.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
324

  
325

  
326
                    //System.ServiceModel.Channels.ReliableSessionBindingElement reliableSession = new System.ServiceModel.Channels.ReliableSessionBindingElement();
327
                    //reliableSession.Ordered = true;
328
                    //reliableSession.MaxRetryCount = 3;
329
                    //basicHttpBinding.CreateBindingElements().Add(reliableSession);
330
                    //basicHttpBinding.ProxyAddress = null;
331
                    //basicHttpBinding.AllowCookies = false;
332
                    //basicHttpBinding.BypassProxyOnLocal = false;
333
                    //basicHttpBinding.UseDefaultWebProxy = false;
334
                    //basicHttpBinding.ProxyAddress = new Uri("Http://localhost:8888");
335

  
336
                    _binding = basicHttpBinding;
337

  
338
                    //System.ServiceModel.Channels.ReliableSessionBindingElement reliableSession = new System.ServiceModel.Channels.ReliableSessionBindingElement();
339
                    //reliableSession.Ordered = true;
340

  
341
                    //System.ServiceModel.Channels.HttpTransportBindingElement httpTransport = new System.ServiceModel.Channels.HttpTransportBindingElement();
342
                    //httpTransport.AuthenticationScheme = System.Net.AuthenticationSchemes.Anonymous;
343
                    //httpTransport.HostNameComparisonMode = HostNameComparisonMode.StrongWildcard;
344
                    //System.ServiceModel.Channels.CustomBinding binding = new System.ServiceModel.Channels.CustomBinding(reliableSession, httpTransport);
345
                    #endregion
346
                }
420 347

  
421 348
                if (isAuthenticate)
422 349
                {
......
435 362

  
436 363
                    FileUploadUri = uploadUri.ToString();
437 364
                }
438
#if BASIC_BINDING
439
                _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", BaseAddress));
440
#elif CUSTOM_BINDING
441
                _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", BaseAddress));
442

  
443
#else
444
                _EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", BaseAddress));
445
#endif
446 365

  
447 366
                App.FileLogger.Debug(_EndPoint.Uri);
448 367

  
KCOM/KCOM.csproj
75 75
    <ErrorReport>prompt</ErrorReport>
76 76
    <CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
77 77
    <Prefer32Bit>false</Prefer32Bit>
78
    <GenerateSerializationAssemblies>Off</GenerateSerializationAssemblies>
78
    <GenerateSerializationAssemblies>Auto</GenerateSerializationAssemblies>
79 79
  </PropertyGroup>
80 80
  <PropertyGroup>
81 81
    <ApplicationIcon>markup.ico</ApplicationIcon>
......
361 361
  </PropertyGroup>
362 362
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release_Default|x64'">
363 363
    <DebugSymbols>true</DebugSymbols>
364
    <OutputPath>bin\x64\Release_Default\</OutputPath>
364
    <OutputPath>..\Setup\</OutputPath>
365 365
    <DefineConstants>TRACE;DEBUG;CUSTOM_BINDING;_BASIC_BINDING</DefineConstants>
366 366
    <WarningLevel>3</WarningLevel>
367 367
    <DebugType>full</DebugType>
KCOM/Properties/Settings.Designer.cs
12 12
    
13 13
    
14 14
    [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
15
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.10.0.0")]
15
    [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0")]
16 16
    internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
17 17
        
18 18
        private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
KCOM/Properties/Settings.settings
5 5
    <Setting Name="BaseClientAddress" Type="System.String" Scope="User">
6 6
      <Value Profile="(Default)">http://www.devdoftech.co.kr:5979</Value>
7 7
    </Setting>
8
    <Setting Name="KCOM_kr_co_devdoftech_cloud_FileUpload" Type="(Web Service URL)" Scope="Application">
9
      <Value Profile="(Default)">http://localhost:44301/ImageUpload/FileUpload.asmx</Value>
10
    </Setting>
11 8
    <Setting Name="KCOM_Get_FinalImage_Get_PdfImage" Type="(Web Service URL)" Scope="Application">
12 9
      <Value Profile="(Default)">http://cloud.devdoftech.co.kr:5977/Get_FInalImage/Get_PdfImage.asmx</Value>
13 10
    </Setting>
......
74 71
    <Setting Name="GemBoxLicense" Type="System.String" Scope="User">
75 72
      <Value Profile="(Default)">EXK0-W4HZ-N518-IMEW</Value>
76 73
    </Setting>
74
    <Setting Name="KCOM_kr_co_devdoftech_cloud_FileUpload" Type="(Web Service URL)" Scope="Application">
75
      <Value Profile="(Default)">https://localhost:44393/FileUpload.asmx</Value>
76
    </Setting>
77 77
  </Settings>
78 78
</SettingsFile>
KCOM_API/KCOM_API.csproj
108 108
    <Content Include="Default.aspx" />
109 109
    <Content Include="HtmlPage1.html" />
110 110
    <Content Include="MarkusService.svc" />
111
    <Content Include="UserData\000000\doftech\3122B88A43BE674C62BA1A24474BC777.svg" />
112
    <Content Include="UserData\000000\doftech\59796CB155465B1BEDC4B526C98F86BF.svg" />
113 111
    <Content Include="Web.config">
114 112
      <SubType>Designer</SubType>
115 113
    </Content>
......
232 230
  </ItemGroup>
233 231
  <ItemGroup>
234 232
    <Folder Include="TileSource\000000_Tile\40000\4000005\" />
233
    <Folder Include="UserData\000000\doftech\" />
235 234
    <Folder Include="UserData\000000\user1\" />
236 235
  </ItemGroup>
237 236
  <PropertyGroup>
......
268 267
    <Optimize>false</Optimize>
269 268
  </PropertyGroup>
270 269
  <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
271
    <OutputPath>bin\</OutputPath>
270
    <OutputPath>..\publish\KCOM_API\</OutputPath>
272 271
    <DefineConstants>TRACE</DefineConstants>
273 272
    <Optimize>false</Optimize>
274 273
    <DebugType>pdbonly</DebugType>

내보내기 Unified diff

클립보드 이미지 추가 (최대 크기: 500 MB)