2017-12-18 6 views
0

Ng Buildコマンドを使用して、Angular-4 appをdistフォルダに公開しました。次に、Azure Web Appにアップロードされます。すべてのファイルがIISサーバーに正しくアップロードされます。 KUDUサイトの画像です enter image description hereAzureに角4を公開する

ただし、Chromeではこれらのファイルを見つけることができません。コンソールのエラーは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> 

関連する問題