2017-12-18 2 views
0

Ng Build 명령을 사용하여 dist-4 폴더에 Angular-4 앱을 게시했습니다. 그런 다음 Azure Web App에 업로드됩니다. 모든 파일은 IIS 서버에 올바르게 업로드됩니다. KUDU 사이트의 이미지입니다. enter image description hereAzure에 Angular 4 게시

그러나 크롬은 이러한 파일을 찾을 수 없습니다. 콘솔의 오류는 404입니다. 이상합니다! 올바른 방향으로 향한 모든 포인터가 많이 감사 할 것입니다. enter image description here

답변

1

당신은 index.html, 특히 기본 href를 확인 했습니까?

1

web.config 파일이 정의되어 있습니까? 그것없이 IIS는 파일 (index.html)을 찾을 곳을 모른다.

<?xml version="1.0" encoding="UTF-8"?> 
<configuration> 
<system.webServer> 
<staticContent> 
    <mimeMap fileExtension="json" mimeType="application/json" /> 
    <mimeMap fileExtension="woff" mimeType="application/font-woff" /> 
    <mimeMap fileExtension="woff2" mimeType="application/font-woff" /> 
</staticContent>    
    <rewrite> 
     <rules> 
      <rule name="SPA" stopProcessing="true"> 
       <match url=".*\.(js|json|txt|css|map|html|ttf|woff|woff2|eot|svg|png)$" negate="true" /> 
       <action type="Rewrite" url="index.html" /> 
      </rule> 
     </rules> 
    </rewrite> 
</system.webServer>