.net core Angular 6 Dotnet核心部署错误

.net core Angular 6 Dotnet核心部署错误,.net-core,angular6,.net Core,Angular6,我正在用DotNet核心开发Angular应用程序。在开发环境中,应用程序工作正常,但发布到IIS服务器时收到以下错误(在index.html中加载脚本文件时出现内部错误) IMG-> IIS文件夹结构如下所示。 html代码是一个 <!doctype html> <html lang="en"> <head> <meta charset="utf-8"> <title>WebPayzUI</title> &

我正在用DotNet核心开发Angular应用程序。在开发环境中,应用程序工作正常,但发布到IIS服务器时收到以下错误(在index.html中加载脚本文件时出现内部错误) IMG->

IIS文件夹结构如下所示。

html代码是一个

<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <title>WebPayzUI</title>
  <base href="/WebPayz/ClientApp/dist">

  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
<link rel="stylesheet" href="styles.0243bd00007c5e1092e8.css"></head>
<body>
  <app-root>Loading...</app-root>
<script type="text/javascript" src="runtime.a66f828dca56eeb90e02.js"></script><script type="text/javascript" src="polyfills.83183756596ff1996025.js"></script><script type="text/javascript" src="scripts.385b291e179030219400.js"></script><script type="text/javascript" src="main.e9e2c4382e2ff45e82db.js"></script></body>
</html>

WebPayzUI
加载。。。
base href=“/WebPayz/”


在index.html文件中将base href更新至上述内容

在进行构建时,您可能需要提供选项“-base href”和“-deploy url”。是否愿意分享您的angular build?如果您有一个数据库连接,请确保您有一个数据库,以及一个有效的连接字符串,并且应用程序池对其具有安全访问权限。部署到IIS的应用程序无法连接到VS express数据库。