개정판 84c48033
issue #000: daelim merged(settings =>ini) 내/외부 구분 하여 api url 을 리턴하도록 Commonlib 추가. daelim ini 추가
Change-Id: I2904309621897cda96f9537982fbd6e53874be29
KCOM/App.xaml.cs | ||
---|---|---|
51 | 51 |
public static string urlPort_DB; |
52 | 52 |
public static string Custom_ViewInfoId; |
53 | 53 |
public static bool ParameterMode = false; |
54 |
public static bool isExternal = false; |
|
54 | 55 |
|
55 | 56 |
/// <summary> |
56 | 57 |
/// logger |
... | ... | |
163 | 164 |
_binding.TextEncoding = System.Text.Encoding.UTF8; |
164 | 165 |
_binding.TransferMode = TransferMode.Buffered; |
165 | 166 |
//Support.SetLicense(); |
166 |
|
|
167 |
string sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", ""); |
|
168 | 167 |
|
168 |
string sBaseServiceURL = string.Empty;//CommonLib.Common.GetConfigString("BaseClientAddress", "URL", ""); |
|
169 |
string localdomain = CommonLib.Common.GetConfigString("HOST_DOMAIN", "DOMAIN", ""); |
|
169 | 170 |
var ipaddress = DNSHelper.GetDnsAdress(); |
170 | 171 |
|
171 | 172 |
try |
172 | 173 |
{ |
173 | 174 |
var hostName = Dns.GetHostEntry(ipaddress).HostName; |
174 | 175 |
|
175 |
if (!hostName.EndsWith(KCOM.Properties.Settings.Default.HOST_DOMAIN))
|
|
176 |
if (!hostName.EndsWith(localdomain))
|
|
176 | 177 |
{ |
177 | 178 |
// 외부 사용자 |
178 |
sBaseServiceURL = global::KCOM.Properties.Settings.Default.Remote_BaseClientAddress;
|
|
179 |
isExternal = true;
|
|
179 | 180 |
} |
180 | 181 |
} |
181 | 182 |
catch (Exception ex) |
182 | 183 |
{ |
183 | 184 |
System.Diagnostics.Debug.WriteLine(ex.ToString()); |
184 | 185 |
} |
185 |
#if DEBUG |
|
186 |
//_EndPoint = new EndpointAddress(@"http://10.11.252.3/MARKUS/ServiceDeepView.svc"); //효성 |
|
187 |
_EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL)); |
|
188 | 186 |
|
187 |
#if DEBUG |
|
188 |
sBaseServiceURL = CommonLib.Common.GetConfigString("Debug_BaseClientAddress", "URL", ""); |
|
189 | 189 |
#else |
190 |
_EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL));
|
|
190 |
sBaseServiceURL = CommonLib.Common.GetConfigString("BaseClientAddress", "URL", "", isExternal);
|
|
191 | 191 |
#endif |
192 |
|
|
192 |
_EndPoint = new EndpointAddress(string.Format("{0}/ServiceDeepView.svc", sBaseServiceURL)); |
|
193 |
|
|
193 | 194 |
if (Environment.Is64BitProcess == true) //64 bit machine |
194 | 195 |
{ |
195 |
versionPath = KCOM.Properties.Settings.Default.UpdateVer64;
|
|
196 |
versionPath = CommonLib.Common.GetConfigString("UpdateVer64", "URL", "", isExternal);
|
|
196 | 197 |
} |
197 | 198 |
else //32 bit machine |
198 | 199 |
{ |
199 |
versionPath = KCOM.Properties.Settings.Default.UpdateVer86;
|
|
200 |
versionPath = CommonLib.Common.GetConfigString("UpdateVer86", "URL", "", isExternal);
|
|
200 | 201 |
} |
201 | 202 |
|
202 | 203 |
if (File.Exists(versionPath)) |
내보내기 Unified diff