diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2018-12-16 21:19:24 -0600 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2018-12-16 21:20:40 -0600 |
| commit | 95a5a8f9efef02ddcec5b3f69be99a00d71a802a (patch) | |
| tree | f0a92b8e8e37e17af6053db11f1b8a7a532cd12c /src/ca/scawebapp7.cpp | |
| parent | aec6e9a4b21accd2e8aeb2cb36ad1cdc8f308f79 (diff) | |
| download | wix-95a5a8f9efef02ddcec5b3f69be99a00d71a802a.tar.gz wix-95a5a8f9efef02ddcec5b3f69be99a00d71a802a.tar.bz2 wix-95a5a8f9efef02ddcec5b3f69be99a00d71a802a.zip | |
Import implementation of IisCA from old repo's scasched/scaexec.
Diffstat (limited to 'src/ca/scawebapp7.cpp')
| -rw-r--r-- | src/ca/scawebapp7.cpp | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/src/ca/scawebapp7.cpp b/src/ca/scawebapp7.cpp new file mode 100644 index 00000000..94e6bb18 --- /dev/null +++ b/src/ca/scawebapp7.cpp | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | #include "precomp.h" | ||
| 4 | HRESULT ScaWriteWebApplication7( | ||
| 5 | __in_z LPCWSTR wzWebName, | ||
| 6 | __in_z LPCWSTR wzRootOfWeb, | ||
| 7 | SCA_WEB_APPLICATION* pswapp, | ||
| 8 | SCA_APPPOOL * /*psapList*/ | ||
| 9 | ) | ||
| 10 | { | ||
| 11 | HRESULT hr = S_OK; | ||
| 12 | |||
| 13 | //all go to same web/root location tag | ||
| 14 | hr = ScaWriteConfigID(IIS_ASP_BEGIN); | ||
| 15 | ExitOnFailure(hr, "Failed to write WebApp ASP begin id"); | ||
| 16 | hr = ScaWriteConfigString(wzWebName); //site name key | ||
| 17 | ExitOnFailure(hr, "Failed to write app web key"); | ||
| 18 | hr = ScaWriteConfigString(wzRootOfWeb); //app path key | ||
| 19 | ExitOnFailure(hr, "Failed to write app web root"); | ||
| 20 | |||
| 21 | // IIS7 Not Supported: Isolation | ||
| 22 | if (MSI_NULL_INTEGER != pswapp->iIsolation) | ||
| 23 | { | ||
| 24 | WcaLog(LOGMSG_TRACEONLY, "Not supported by IIS7: Isolation Mode, ignoring"); | ||
| 25 | } | ||
| 26 | |||
| 27 | // allow session state | ||
| 28 | if (MSI_NULL_INTEGER != pswapp->fAllowSessionState) | ||
| 29 | { | ||
| 30 | //system.webServer/asp /session | allowSessionState | ||
| 31 | hr = ScaWriteConfigID(IIS_ASP_SESSIONSTATE); | ||
| 32 | ExitOnFailure(hr, "Failed to write WebApp ASP sessionstate id"); | ||
| 33 | hr = ScaWriteConfigInteger(pswapp->fAllowSessionState); | ||
| 34 | ExitOnFailure(hr, "Failed to write allow session information for App: '%ls'", pswapp->wzName); | ||
| 35 | } | ||
| 36 | |||
| 37 | // session timeout | ||
| 38 | if (MSI_NULL_INTEGER != pswapp->iSessionTimeout) | ||
| 39 | { | ||
| 40 | //system.webServer/asp /session | timeout | ||
| 41 | hr = ScaWriteConfigID(IIS_ASP_SESSIONTIMEOUT); | ||
| 42 | ExitOnFailure(hr, "Failed to write WebApp ASP sessiontimepot id"); | ||
| 43 | hr = ScaWriteConfigInteger(pswapp->iSessionTimeout); | ||
| 44 | ExitOnFailure(hr, "Failed to write session timeout for App: '%ls'", pswapp->wzName); | ||
| 45 | } | ||
| 46 | |||
| 47 | // asp buffering | ||
| 48 | if (MSI_NULL_INTEGER != pswapp->fBuffer) | ||
| 49 | { | ||
| 50 | //system.webServer/asp | bufferingOn | ||
| 51 | hr = ScaWriteConfigID(IIS_ASP_BUFFER); | ||
| 52 | ExitOnFailure(hr, "Failed to write WebApp ASP buffer id"); | ||
| 53 | hr = ScaWriteConfigInteger(pswapp->fBuffer); | ||
| 54 | ExitOnFailure(hr, "Failed to write buffering flag for App: '%ls'", pswapp->wzName); | ||
| 55 | } | ||
| 56 | |||
| 57 | // asp parent paths | ||
| 58 | if (MSI_NULL_INTEGER != pswapp->fParentPaths) | ||
| 59 | { | ||
| 60 | //system.webServer/asp | enableParentPaths | ||
| 61 | hr = ScaWriteConfigID(IIS_ASP_PARENTPATHS); | ||
| 62 | ExitOnFailure(hr, "Failed to write WebApp ASP parentpaths id"); | ||
| 63 | hr = ScaWriteConfigInteger(pswapp->fParentPaths); | ||
| 64 | ExitOnFailure(hr, "Failed to write parent paths flag for App: '%ls'", pswapp->wzName); | ||
| 65 | } | ||
| 66 | |||
| 67 | // default scripting language | ||
| 68 | if (*pswapp->wzDefaultScript) | ||
| 69 | { | ||
| 70 | //system.webServer/asp | scriptLanguage | ||
| 71 | hr = ScaWriteConfigID(IIS_ASP_SCRIPTLANG); | ||
| 72 | ExitOnFailure(hr, "Failed to write WebApp ASP script lang id"); | ||
| 73 | hr = ScaWriteConfigString(pswapp->wzDefaultScript); | ||
| 74 | ExitOnFailure(hr, "Failed to write default scripting language for App: '%ls'", pswapp->wzName); | ||
| 75 | } | ||
| 76 | |||
| 77 | // asp script timeout | ||
| 78 | if (MSI_NULL_INTEGER != pswapp->iScriptTimeout) | ||
| 79 | { | ||
| 80 | //system.webServer/asp /limits | scriptTimeout | ||
| 81 | hr = ScaWriteConfigID(IIS_ASP_SCRIPTTIMEOUT); | ||
| 82 | ExitOnFailure(hr, "Failed to write WebApp ASP script timeout id"); | ||
| 83 | hr = ScaWriteConfigInteger(pswapp->iScriptTimeout); | ||
| 84 | ExitOnFailure(hr, "Failed to write script timeout for App: '%ls'", pswapp->wzName); | ||
| 85 | } | ||
| 86 | |||
| 87 | // asp server-side script debugging | ||
| 88 | if (MSI_NULL_INTEGER != pswapp->fServerDebugging) | ||
| 89 | { | ||
| 90 | //system.webServer/asp | appAllowDebugging | ||
| 91 | hr = ScaWriteConfigID(IIS_ASP_SCRIPTSERVERDEBUG); | ||
| 92 | ExitOnFailure(hr, "Failed to write WebApp ASP script debug id"); | ||
| 93 | hr = ScaWriteConfigInteger(pswapp->fServerDebugging); | ||
| 94 | ExitOnFailure(hr, "Failed to write ASP server-side script debugging flag for App: '%ls'", pswapp->wzName); | ||
| 95 | } | ||
| 96 | |||
| 97 | // asp client-side script debugging | ||
| 98 | if (MSI_NULL_INTEGER != pswapp->fClientDebugging) | ||
| 99 | { | ||
| 100 | //system.webServer/asp | appAllowClientDebug | ||
| 101 | hr = ScaWriteConfigID(IIS_ASP_SCRIPTCLIENTDEBUG); | ||
| 102 | ExitOnFailure(hr, "Failed to write WebApp ASP script debug id"); | ||
| 103 | hr = ScaWriteConfigInteger(pswapp->fClientDebugging); | ||
| 104 | ExitOnFailure(hr, "Failed to write ASP client-side script debugging flag for App: '%ls'", pswapp->wzName); | ||
| 105 | } | ||
| 106 | |||
| 107 | //done with ASP application properties | ||
| 108 | hr = ScaWriteConfigID(IIS_ASP_END); | ||
| 109 | ExitOnFailure(hr, "Failed to write WebApp ASP begin id"); | ||
| 110 | |||
| 111 | //write out app estensions | ||
| 112 | if (pswapp->pswappextList) | ||
| 113 | { | ||
| 114 | hr = ScaWebAppExtensionsWrite7(wzWebName, wzRootOfWeb, pswapp->pswappextList); | ||
| 115 | ExitOnFailure(hr, "Failed to write AppExtensions for App: '%ls'", pswapp->wzName); | ||
| 116 | } | ||
| 117 | |||
| 118 | LExit: | ||
| 119 | return hr; | ||
| 120 | } | ||
