Asp.net 脚本文件未加载到angularjs web api应用程序中

Asp.net 脚本文件未加载到angularjs web api应用程序中,asp.net,angularjs,iis,static-content,Asp.net,Angularjs,Iis,Static Content,我已经在angularjs(使用AngularRouting特性)中构建和应用程序,它为CRUD操作调用web api服务。当我从VisualStudio运行应用程序时,一切正常。当我在IIS web服务器上部署应用程序时,脚本文件不会加载,因为它们是在以应用程序名称为前缀的路径中搜索的。我的应用程序的启动页面是Index.html,它有以下代码来加载脚本 <title></title> <base href="/" /> <meta charset="

我已经在angularjs(使用AngularRouting特性)中构建和应用程序,它为CRUD操作调用web api服务。当我从VisualStudio运行应用程序时,一切正常。当我在IIS web服务器上部署应用程序时,脚本文件不会加载,因为它们是在以应用程序名称为前缀的路径中搜索的。我的应用程序的启动页面是Index.html,它有以下代码来加载脚本

<title></title>
<base href="/" />
<meta charset="utf-8" />
<script src="/Scripts/angular.min.js"></script>
<script src="/Scripts/angular-route.min.js"></script>
<script src="/Scripts/app.js"></script>
<script src="/Scripts/xeditable.js"></script>
<link href="/css/xeditable.css" rel="stylesheet" />
<link href="/Content/bootstrap-theme.css" rel="stylesheet" />
<link href="/Content/bootstrap.css" rel="stylesheet" />

当我在IIS上托管后运行应用程序时,我看到文件未加载,如下所示:

我的应用程序url是

因此,如果更改index.html以添加应用程序名称,脚本文件将正确加载

<title></title>
<base href="/" />
<meta charset="utf-8" />
<script src="/RoutingSample/Scripts/angular.min.js"></script>
<script src="/RoutingSample/Scripts/angular-route.min.js"></script>
<script src="/RoutingSample/Scripts/app.js"></script>
<script src="/RoutingSample/Scripts/xeditable.js"></script>
<link href="/RoutingSample/css/xeditable.css" rel="stylesheet" />
<link href="/RoutingSample/Content/bootstrap-theme.css" rel="stylesheet" />
<link href="/RoutingSample/Content/bootstrap.css" rel="stylesheet" />


我的问题是-是否有任何方法可以在IIS中进行配置,这样我就不需要修改所有html文件以在文件路径之前添加此应用程序名?

我通过将应用程序部署为新网站而不是在默认网站下部署为web应用程序来解决此问题。

对此没有回答?