
UWP 애플리케이션을 배포하려고 하는데 약간 이상한 문제가 발생했습니다.
- 애플리케이션은 자동 업데이트 기능을 사용하여 Visual Studio에서 빌드되어
.appinstaller
파일 및 관련 MSIX 번들 등이 생성됩니다. - 이러한 아티팩트는 배포를 위해 Azure App Service에 업로드됩니다.
- 파일 을 다운로드하고 실행하면
.appinstaller
오류가 발생합니다Error in parsing the app package.
. 특히 도움이 되지 않습니다. - 앱은 아래에 설치된 인증서로 서명됩니다.
Trusted Publishers
web.config
서버의 파일은 MIME 유형을 올바르게 매핑하도록 설정됩니다 .
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.webServer>
<staticContent>
<mimeMap fileExtension=".appx" mimeType="application/appx" />
<mimeMap fileExtension=".msix" mimeType="application/msix" />
<mimeMap fileExtension=".appxbundle" mimeType="application/appxbundle" />
<mimeMap fileExtension=".msixbundle" mimeType="application/msixbundle" />
<mimeMap fileExtension=".appinstaller" mimeType="application/appinstaller" />
</staticContent>
</system.webServer>
</configuration>
PowerShell(승격되지 않은)에서 설치를 실행하면
Add-AppxPackage -Appinstaller https://[test].azurewebsites.net/[appname].appinstaller
앱이 올바르게 설치되고 정상적으로 작동합니다.Fiddler를 사용하여 UI를 통해 설치하면 서버에서 412 오류가 발생하는 것을 확인했습니다.
요구:
GET https://[test].azurewebsites.net/[appname]_1.0.0.0_Test/[appname]_1.0.0.0_x64.msixbundle HTTP/1.1
Connection: Keep-Alive
Accept-Encoding: gzip, deflate
If-Match: W/"086c9a4cfd51:0"
Range: bytes=10878976-11010047
If-Unmodified-Since: Mon, 20 May 2019 20:42:56 GMT
Host:[test].azurewebsites.net
응답:
HTTP/1.1 412 Precondition Failed
Content-Length: 86
Content-Type: text/html
Last-Modified: Mon, 20 May 2019 20:42:56 GMT
Accept-Ranges: bytes
ETag: W/"086c9a4cfd51:0"
Server: Microsoft-IIS/10.0
X-Powered-By: ASP.NET
Date: Mon, 20 May 2019 20:21:12 GMT
The request was not completed due to preconditions that are set in the request header.
- PowerShell 클라이언트가
If-Unmodified-Since
또는If-Match
헤더를 보내는 것으로 나타나지 않습니다.
GET https://[test].azurewebsites.net/[appname]_1.0.0.0_Test/[appname]_1.0.0.0_x64.msixbundle HTTP/1.1
Connection: Keep-Alive
Range: bytes=11079260-11145819
User-Agent: App Virt Client/1.0
Host: [test].azurewebsites.net
위의 내용을 고려하면:
.appinstaller
IIS에서 UWP를 호스팅하기 위한 확실한 서버 구성이 누락되었나요 ?- UI 를 통해 UWP 애플리케이션을 사이드로드하는 데 알려진 문제가 있나요
.appinstaller
? - 전제 조건이 문제를 일으키는지 여부를 테스트하기 위해 전제 조건을 무시하도록 IIS를 구성하는 방법이 있습니까?
편집하다:
로그 파일( AILog.txt
)을 찾았습니다.
[Tue May 21 15:40:17 2019]{10188} Manifest Info -> Package is Not Headless
[Tue May 21 15:40:17 2019]{10188} Manifest Info -> Package is Not a Modification Package
[Tue May 21 15:40:17 2019]{10188} ERROR: AppsInfo -> Error: [0x80004005]
편집 2:
많은 조사 끝에 비교적 변경 사항이 거의 없는 작업 빌드를 얻었습니다.
EnableDotNetNativeCompatibleProfile
(저는 이것을 로 설정했습니다true
)RuntimeIdentifiers
(이것을 .csproj 파일에 추가했습니다)- VS2019 대신 VS2017에서 빌드
제거 과정을 통해 이들 중 어느 것이 범인인지 식별할 수 있기를 바랍니다.