markus / AppDemo / Program.cs @ master
이력 | 보기 | 이력해설 | 다운로드 (834 Bytes)
1 | 950e6b84 | taeseongkim | using KCOM; |
---|---|---|---|
2 | using System; |
||
3 | using System.Collections.Generic; |
||
4 | using System.Linq; |
||
5 | using System.Text; |
||
6 | using System.Threading.Tasks; |
||
7 | |||
8 | namespace KcomDemo |
||
9 | { |
||
10 | class Program |
||
11 | { |
||
12 | static void Main(string[] args) |
||
13 | { |
||
14 | if (VistaSecurity.IsAdmin()) |
||
15 | { |
||
16 | service = new Service1(); |
||
17 | |||
18 | Uri baseAddress = new Uri("http://localhost:5000"); |
||
19 | host = host.WcfCreate(service, typeof(OwinTest.IService1), new Uri("http://localhost:5000/Service1.svc")); |
||
20 | |||
21 | |||
22 | |||
23 | Console.WriteLine("The service is ready at {0}", baseAddress); |
||
24 | Console.WriteLine("Press <Enter> to stop the service."); |
||
25 | Console.ReadLine(); |
||
26 | |||
27 | } |
||
28 | else |
||
29 | { |
||
30 | VistaSecurity.RestartElevated(); |
||
31 | } |
||
32 | } |
||
33 | } |
||
34 | } |