개정판 cce8e319
issue @00000 markus create api 추가
Change-Id: Ifd31de038b29d5676cb9075494746922b31056a4
ID2.Manager/MarkusImageCreateAPI/ImageCreate.asmx | ||
---|---|---|
1 |
<%@ WebService Language="C#" CodeBehind="ImageCreate.asmx.cs" Class="MarkusImageCreateAPI.ImageCreate" %> |
ID2.Manager/MarkusImageCreateAPI/ImageCreate.asmx.cs | ||
---|---|---|
1 |
using System; |
|
2 |
using System.Collections.Generic; |
|
3 |
using System.Diagnostics; |
|
4 |
using System.Linq; |
|
5 |
using System.Reflection; |
|
6 |
using System.Web; |
|
7 |
using System.Web.Services; |
|
8 |
|
|
9 |
namespace MarkusImageCreateAPI |
|
10 |
{ |
|
11 |
/// <summary> |
|
12 |
/// ImageCreate의 요약 설명입니다. |
|
13 |
/// </summary> |
|
14 |
[WebService(Namespace = "http://markus.org/")] |
|
15 |
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] |
|
16 |
[System.ComponentModel.ToolboxItem(false)] |
|
17 |
// ASP.NET AJAX를 사용하여 스크립트에서 이 웹 서비스를 호출하려면 다음 줄의 주석 처리를 제거합니다. |
|
18 |
// [System.Web.Script.Services.ScriptService] |
|
19 |
public class ImageCreate : System.Web.Services.WebService |
|
20 |
{ |
|
21 |
private static string PROCESS_FILE_NAME = System.IO.Path.Combine(HttpContext.Current.Server.MapPath("/Process"), "MarkusImageCreate.exe"); |
|
22 |
|
|
23 |
[WebMethod] |
|
24 |
public string Path() |
|
25 |
{ |
|
26 |
return PROCESS_FILE_NAME; |
|
27 |
} |
|
28 |
|
|
29 |
|
|
30 |
[WebMethod] |
|
31 |
public string Run(string ProjectNo,string DocID) |
|
32 |
{ |
|
33 |
var killProcess = Process.GetProcessesByName("MarkusImageCreate.exe"); |
|
34 |
|
|
35 |
foreach (var item in killProcess) |
|
36 |
{ |
|
37 |
if ((item.StartTime - DateTime.Now) > new TimeSpan(0, 1, 0)) |
|
38 |
{ |
|
39 |
item.Kill(); |
|
40 |
} |
|
41 |
} |
|
42 |
|
|
43 |
Process process = new Process(); |
|
44 |
|
|
45 |
ProcessStartInfo startInfo = new ProcessStartInfo |
|
46 |
{ |
|
47 |
WorkingDirectory = HttpContext.Current.Server.MapPath("/Process"), |
|
48 |
FileName = PROCESS_FILE_NAME, |
|
49 |
WindowStyle = ProcessWindowStyle.Hidden, |
|
50 |
CreateNoWindow = true, |
|
51 |
ErrorDialog = false, |
|
52 |
Verb = "runas", |
|
53 |
RedirectStandardInput = false, |
|
54 |
RedirectStandardError = false, |
|
55 |
Arguments = $"RUN {ProjectNo} {DocID}" |
|
56 |
}; |
|
57 |
|
|
58 |
process.StartInfo = startInfo; |
|
59 |
process.EnableRaisingEvents = false; |
|
60 |
process.Start(); |
|
61 |
return "Start"; |
|
62 |
} |
|
63 |
} |
|
64 |
} |
ID2.Manager/MarkusImageCreateAPI/MarkusImageCreateAPI.csproj | ||
---|---|---|
1 |
<Project ToolsVersion="15.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
2 |
<Import Project="..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props" Condition="Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" /> |
|
3 |
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> |
|
4 |
<PropertyGroup> |
|
5 |
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
|
6 |
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
|
7 |
<ProductVersion> |
|
8 |
</ProductVersion> |
|
9 |
<SchemaVersion>2.0</SchemaVersion> |
|
10 |
<ProjectGuid>{55BA26BD-02BF-4BE8-BBDA-0496615E91C3}</ProjectGuid> |
|
11 |
<ProjectTypeGuids>{349c5851-65df-11da-9384-00065b846f21};{fae04ec0-301f-11d3-bf4b-00c04f79efbc}</ProjectTypeGuids> |
|
12 |
<OutputType>Library</OutputType> |
|
13 |
<AppDesignerFolder>Properties</AppDesignerFolder> |
|
14 |
<RootNamespace>MarkusImageCreateAPI</RootNamespace> |
|
15 |
<AssemblyName>MarkusImageCreateAPI</AssemblyName> |
|
16 |
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion> |
|
17 |
<UseIISExpress>true</UseIISExpress> |
|
18 |
<Use64BitIISExpress /> |
|
19 |
<IISExpressSSLPort /> |
|
20 |
<IISExpressAnonymousAuthentication /> |
|
21 |
<IISExpressWindowsAuthentication /> |
|
22 |
<IISExpressUseClassicPipelineMode /> |
|
23 |
<UseGlobalApplicationHostFile /> |
|
24 |
<NuGetPackageImportStamp> |
|
25 |
</NuGetPackageImportStamp> |
|
26 |
</PropertyGroup> |
|
27 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> |
|
28 |
<DebugSymbols>true</DebugSymbols> |
|
29 |
<DebugType>full</DebugType> |
|
30 |
<Optimize>false</Optimize> |
|
31 |
<OutputPath>bin\</OutputPath> |
|
32 |
<DefineConstants>DEBUG;TRACE</DefineConstants> |
|
33 |
<ErrorReport>prompt</ErrorReport> |
|
34 |
<WarningLevel>4</WarningLevel> |
|
35 |
<PlatformTarget>AnyCPU</PlatformTarget> |
|
36 |
<RegisterForComInterop>false</RegisterForComInterop> |
|
37 |
<AllowUnsafeBlocks>false</AllowUnsafeBlocks> |
|
38 |
</PropertyGroup> |
|
39 |
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
|
40 |
<DebugSymbols>true</DebugSymbols> |
|
41 |
<DebugType>pdbonly</DebugType> |
|
42 |
<Optimize>true</Optimize> |
|
43 |
<OutputPath>bin\</OutputPath> |
|
44 |
<DefineConstants>TRACE</DefineConstants> |
|
45 |
<ErrorReport>prompt</ErrorReport> |
|
46 |
<WarningLevel>4</WarningLevel> |
|
47 |
</PropertyGroup> |
|
48 |
<ItemGroup> |
|
49 |
<Reference Include="Microsoft.CSharp" /> |
|
50 |
<Reference Include="System.Web.DynamicData" /> |
|
51 |
<Reference Include="System.Web.Entity" /> |
|
52 |
<Reference Include="System.Web.ApplicationServices" /> |
|
53 |
<Reference Include="System.ComponentModel.DataAnnotations" /> |
|
54 |
<Reference Include="System" /> |
|
55 |
<Reference Include="System.Data" /> |
|
56 |
<Reference Include="System.Core" /> |
|
57 |
<Reference Include="System.Data.DataSetExtensions" /> |
|
58 |
<Reference Include="System.Web.Extensions" /> |
|
59 |
<Reference Include="System.Xml.Linq" /> |
|
60 |
<Reference Include="System.Drawing" /> |
|
61 |
<Reference Include="System.Web" /> |
|
62 |
<Reference Include="System.Xml" /> |
|
63 |
<Reference Include="System.Configuration" /> |
|
64 |
<Reference Include="System.Web.Services" /> |
|
65 |
<Reference Include="System.EnterpriseServices" /> |
|
66 |
</ItemGroup> |
|
67 |
<ItemGroup> |
|
68 |
<Content Include="ImageCreate.asmx" /> |
|
69 |
<Content Include="Web.config" /> |
|
70 |
</ItemGroup> |
|
71 |
<ItemGroup> |
|
72 |
<Compile Include="ImageCreate.asmx.cs"> |
|
73 |
<DependentUpon>ImageCreate.asmx</DependentUpon> |
|
74 |
<SubType>Component</SubType> |
|
75 |
</Compile> |
|
76 |
<Compile Include="Properties\AssemblyInfo.cs" /> |
|
77 |
</ItemGroup> |
|
78 |
<ItemGroup> |
|
79 |
<None Include="Web.Debug.config"> |
|
80 |
<DependentUpon>Web.config</DependentUpon> |
|
81 |
</None> |
|
82 |
<None Include="Web.Release.config"> |
|
83 |
<DependentUpon>Web.config</DependentUpon> |
|
84 |
</None> |
|
85 |
</ItemGroup> |
|
86 |
<ItemGroup> |
|
87 |
<Folder Include="Process\" /> |
|
88 |
</ItemGroup> |
|
89 |
<PropertyGroup> |
|
90 |
<VisualStudioVersion Condition="'$(VisualStudioVersion)' == ''">10.0</VisualStudioVersion> |
|
91 |
<VSToolsPath Condition="'$(VSToolsPath)' == ''">$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)</VSToolsPath> |
|
92 |
</PropertyGroup> |
|
93 |
<Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> |
|
94 |
<Import Project="$(VSToolsPath)\WebApplications\Microsoft.WebApplication.targets" Condition="'$(VSToolsPath)' != ''" /> |
|
95 |
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v10.0\WebApplications\Microsoft.WebApplication.targets" Condition="false" /> |
|
96 |
<ProjectExtensions> |
|
97 |
<VisualStudio> |
|
98 |
<FlavorProperties GUID="{349c5851-65df-11da-9384-00065b846f21}"> |
|
99 |
<WebProjectProperties> |
|
100 |
<UseIIS>True</UseIIS> |
|
101 |
<AutoAssignPort>True</AutoAssignPort> |
|
102 |
<DevelopmentServerPort>58425</DevelopmentServerPort> |
|
103 |
<DevelopmentServerVPath>/</DevelopmentServerVPath> |
|
104 |
<IISUrl>http://localhost:58425/</IISUrl> |
|
105 |
<NTLMAuthentication>False</NTLMAuthentication> |
|
106 |
<UseCustomServer>False</UseCustomServer> |
|
107 |
<CustomServerUrl> |
|
108 |
</CustomServerUrl> |
|
109 |
<SaveServerSettingsInUserFile>False</SaveServerSettingsInUserFile> |
|
110 |
</WebProjectProperties> |
|
111 |
</FlavorProperties> |
|
112 |
</VisualStudio> |
|
113 |
</ProjectExtensions> |
|
114 |
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> |
|
115 |
<PropertyGroup> |
|
116 |
<ErrorText>이 프로젝트는 이 컴퓨터에 없는 NuGet 패키지를 참조합니다. 해당 패키지를 다운로드하려면 NuGet 패키지 복원을 사용하십시오. 자세한 내용은 http://go.microsoft.com/fwlink/?LinkID=322105를 참조하십시오. 누락된 파일은 {0}입니다.</ErrorText> |
|
117 |
</PropertyGroup> |
|
118 |
<Error Condition="!Exists('..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.2.0.1\build\net46\Microsoft.CodeDom.Providers.DotNetCompilerPlatform.props'))" /> |
|
119 |
</Target> |
|
120 |
<PropertyGroup> |
|
121 |
<PreBuildEvent>REM RD "$(TargetDir)Process" |
|
122 |
REM mD "$(TargetDir)Process" |
|
123 |
REM xcopy /s "$(ProjectDir)..\publish\MarkusImageCreate\" "$(ProjectDir)Process\" /Y /F</PreBuildEvent> |
|
124 |
</PropertyGroup> |
|
125 |
<!-- To modify your build process, add your task inside one of the targets below and uncomment it. |
|
126 |
Other similar extension points exist, see Microsoft.Common.targets. |
|
127 |
<Target Name="BeforeBuild"> |
|
128 |
</Target> |
|
129 |
<Target Name="AfterBuild"> |
|
130 |
</Target> |
|
131 |
--> |
|
132 |
</Project> |
ID2.Manager/MarkusImageCreateAPI/Properties/AssemblyInfo.cs | ||
---|---|---|
1 |
using System.Reflection; |
|
2 |
using System.Runtime.CompilerServices; |
|
3 |
using System.Runtime.InteropServices; |
|
4 |
|
|
5 |
// 어셈블리의 일반 정보는 다음 특성 집합을 통해 |
|
6 |
// 제어됩니다. 어셈블리와 관련된 정보를 수정하려면 |
|
7 |
// 이 특성 값을 변경하십시오. |
|
8 |
[assembly: AssemblyTitle("MarkusImageCreateAPI")] |
|
9 |
[assembly: AssemblyDescription("")] |
|
10 |
[assembly: AssemblyConfiguration("")] |
|
11 |
[assembly: AssemblyCompany("")] |
|
12 |
[assembly: AssemblyProduct("MarkusImageCreateAPI")] |
|
13 |
[assembly: AssemblyCopyright("Copyright © 2023")] |
|
14 |
[assembly: AssemblyTrademark("")] |
|
15 |
[assembly: AssemblyCulture("")] |
|
16 |
|
|
17 |
// ComVisible을 false로 설정하면 이 어셈블리의 형식이 COM 구성 요소에 |
|
18 |
// 표시되지 않습니다. COM에서 이 어셈블리의 형식에 액세스하려면 |
|
19 |
// 해당 형식에 대해 ComVisible 특성을 true로 설정하십시오. |
|
20 |
[assembly: ComVisible(false)] |
|
21 |
|
|
22 |
// 이 프로젝트가 COM에 노출되는 경우 다음 GUID는 typelib의 ID를 나타냅니다. |
|
23 |
[assembly: Guid("55ba26bd-02bf-4be8-bbda-0496615e91c3")] |
|
24 |
|
|
25 |
// 어셈블리의 버전 정보는 다음 네 가지 값으로 구성됩니다.: |
|
26 |
// |
|
27 |
// 주 버전 |
|
28 |
// 부 버전 |
|
29 |
// 빌드 번호 |
|
30 |
// 수정 버전 |
|
31 |
// |
|
32 |
// 모든 값을 지정하거나 아래와 같이 '*'를 사용하여 빌드 번호 및 수정 버전이 자동으로 |
|
33 |
// 지정되도록 할 수 있습니다.: |
|
34 |
[assembly: AssemblyVersion("1.0.0.0")] |
|
35 |
[assembly: AssemblyFileVersion("1.0.0.0")] |
ID2.Manager/MarkusImageCreateAPI/Properties/PublishProfiles/FolderProfile.pubxml | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
https://go.microsoft.com/fwlink/?LinkID=208121. |
|
4 |
--> |
|
5 |
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
|
6 |
<PropertyGroup> |
|
7 |
<DeleteExistingFiles>True</DeleteExistingFiles> |
|
8 |
<ExcludeApp_Data>False</ExcludeApp_Data> |
|
9 |
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish> |
|
10 |
<LastUsedBuildConfiguration>MarkusImageCreate</LastUsedBuildConfiguration> |
|
11 |
<LastUsedPlatform>Any CPU</LastUsedPlatform> |
|
12 |
<PublishProvider>FileSystem</PublishProvider> |
|
13 |
<PublishUrl>..\Publish\MarkusImageCreateAPI\</PublishUrl> |
|
14 |
<WebPublishMethod>FileSystem</WebPublishMethod> |
|
15 |
<SiteUrlToLaunchAfterPublish /> |
|
16 |
</PropertyGroup> |
|
17 |
</Project> |
ID2.Manager/MarkusImageCreateAPI/Web.Debug.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
|
|
3 |
<!-- web.config 변환 사용에 대한 자세한 내용은 https://go.microsoft.com/fwlink/?LinkId=125889를 참조하세요. --> |
|
4 |
|
|
5 |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
|
6 |
<!-- |
|
7 |
아래 예에서, "Match" 로케이터가 "MyDB" 값을 가진 "name" 특성을 |
|
8 |
찾은 경우에만 "SetAttributes" 변환에서 "ReleaseSQLServer"를 |
|
9 |
사용하도록 "connectionString"의 값을 변경합니다. |
|
10 |
|
|
11 |
<connectionStrings> |
|
12 |
<add name="MyDB" |
|
13 |
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" |
|
14 |
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> |
|
15 |
</connectionStrings> |
|
16 |
--> |
|
17 |
<system.web> |
|
18 |
<!-- |
|
19 |
|
|
20 |
아래 예에서 "Replace" 변환은 web.config 파일의 |
|
21 |
<customErrors> 섹션 전체를 바꿉니다. |
|
22 |
<system.web> 노드 아래에는 customErrors 섹션이 하나만 있기 때문에 |
|
23 |
"xdt:Locator" 특성을 사용할 필요가 없습니다. |
|
24 |
|
|
25 |
<customErrors defaultRedirect="GenericError.htm" |
|
26 |
mode="RemoteOnly" xdt:Transform="Replace"> |
|
27 |
<error statusCode="500" redirect="InternalError.htm"/> |
|
28 |
</customErrors> |
|
29 |
> |
|
30 |
--> |
|
31 |
</system.web> |
|
32 |
</configuration> |
ID2.Manager/MarkusImageCreateAPI/Web.Release.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
|
|
3 |
<!-- web.config 변환 사용에 대한 자세한 내용은 https://go.microsoft.com/fwlink/?LinkId=125889를 참조하세요. --> |
|
4 |
|
|
5 |
<configuration xmlns:xdt="http://schemas.microsoft.com/XML-Document-Transform"> |
|
6 |
<!-- |
|
7 |
아래 예에서, "Match" 로케이터가 "MyDB" 값을 가진 "name" 특성을 |
|
8 |
찾은 경우에만 "SetAttributes" 변환에서 "ReleaseSQLServer"를 |
|
9 |
사용하도록 "connectionString"의 값을 변경합니다. |
|
10 |
|
|
11 |
<connectionStrings> |
|
12 |
<add name="MyDB" |
|
13 |
connectionString="Data Source=ReleaseSQLServer;Initial Catalog=MyReleaseDB;Integrated Security=True" |
|
14 |
xdt:Transform="SetAttributes" xdt:Locator="Match(name)"/> |
|
15 |
</connectionStrings> |
|
16 |
--> |
|
17 |
<system.web> |
|
18 |
<compilation xdt:Transform="RemoveAttributes(debug)" /> |
|
19 |
<!-- |
|
20 |
|
|
21 |
아래 예에서 "Replace" 변환은 web.config 파일의 |
|
22 |
<customErrors> 섹션 전체를 바꿉니다. |
|
23 |
<system.web> 노드 아래에는 customErrors 섹션이 하나만 있기 때문에 |
|
24 |
"xdt:Locator" 특성을 사용할 필요가 없습니다. |
|
25 |
|
|
26 |
<customErrors defaultRedirect="GenericError.htm" |
|
27 |
mode="RemoteOnly" xdt:Transform="Replace"> |
|
28 |
<error statusCode="500" redirect="InternalError.htm"/> |
|
29 |
</customErrors> |
|
30 |
> |
|
31 |
--> |
|
32 |
</system.web> |
|
33 |
</configuration> |
ID2.Manager/MarkusImageCreateAPI/Web.config | ||
---|---|---|
1 |
<?xml version="1.0" encoding="utf-8"?> |
|
2 |
<!-- |
|
3 |
ASP.NET 애플리케이션을 구성하는 방법에 대한 자세한 내용은 다음을 참조하세요. |
|
4 |
https://go.microsoft.com/fwlink/?LinkId=169433 |
|
5 |
--> |
|
6 |
<configuration> |
|
7 |
<system.web> |
|
8 |
<compilation debug="true" targetFramework="4.6" /> |
|
9 |
<pages controlRenderingCompatibilityVersion="4.0"/> |
|
10 |
</system.web> |
|
11 |
<system.serviceModel> |
|
12 |
<bindings/> |
|
13 |
<client/> |
|
14 |
</system.serviceModel> |
|
15 |
</configuration> |
내보내기 Unified diff