我試圖在IIS服務器上部署一個角4的網站,我得到這個錯誤部署角4 IIS錯誤「403 - 禁止訪問:訪問被拒絕。」
「403 - 禁止訪問:訪問被拒絕」
我的,我使用的網址是http://domain/LpPortal2/login/client和「客戶端」是不是在我的角度項目的實際組成部分,它是我的登錄頁面要知道在頁面上顯示其標誌和顏色。這是我的app.routes.ts中的代碼。
const routes: Routes = [
{
path: '',
redirectTo: 'login',
pathMatch: 'full'
},
{
path: 'login/:clientCode',
component: LoginComponent
},
...
這裏是我的web.config的情況下,爲您的信息:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<modules>
<remove name="UrlRoutingModule-4.0" />
<add name="UrlRoutingModule-4.0"
type="System.Web.Routing.UrlRoutingModule" preCondition="" />
</modules>
<handlers>
<remove name="UrlRoutingHandler"/>
</handlers>
<rewrite>
<rules>
<rule name="Angular" stopProcessing="true">
<match url=".*" />
<conditions logicalGrouping="MatchAll">
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/" />
</rule>
</rules>
</rewrite>
<staticContent>
<remove fileExtension=".json" />
<mimeMap fileExtension=".json" mimeType="application/json" />
</staticContent>
<defaultDocument>
<files>
<remove value="index.php" />
<remove value="default.aspx" />
<remove value="iisstart.htm" />
<remove value="index.htm" />
<remove value="Default.asp" />
<remove value="Default.htm" />
</files>
</defaultDocument>
</system.webServer>
感謝您的幫助。