I have built and application in angularjs (using angular routing feature) which calls web api services for CRUD operations. Everything works fine when i run the application from visual studio. When I deploy the application on IIS web server script files do not load as they are searched in path which is prefixed by application name. Start up page of my application is Index.html which has following code to load scripts.
<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" />
When i run the application after hosting on IIS I see files are not loading as below:
My application url is http://localhost/RoutingSample/index.html
so if change index.html to add application name script files load properly.
<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" />
my question is - is there any way of configuring in IIS so that I don't need to modify all html files to add this application name before file paths?