我想问一下如何配置我的IIS。 我使用默认网站并在其中添加Web应用程序。 但是,我遇到了脚本问题。
在我的母版页中,我有这段代码
<script type="text/javascript" src="../../Scripts/jquery-1.12.0.min.js"></script>
<link type="text/css" href="../../Scripts/toastr/toastr.min.css" rel="Stylesheet" />
<script type="text/javascript" src="../../Scripts/toastr/toastr.min.js"></script>
<link type="text/css" href="../../Scripts/tipsy/src/stylesheets/tipsy.css" rel="Stylesheet" />
<script type="text/javascript" src="../../Scripts/tipsy/src/javascripts/jquery.tipsy.js"></script>
<script type="text/javascript" src="../../Scripts/moment.min.js"></script>
<script type="text/javascript" src="../../Scripts/IE8Compatibility/excanvas.js"></script>
<script type="text/javascript" src="../../Scripts/IE8Compatibility/html5shiv.min.js"></script>
<script type="text/javascript" src="../../Scripts/IE8Compatibility/respond.min.js"></script>
在运行时和访问页面期间,我检查了源代码。我找到了这个。
<script type="text/javascript" src="../../Scripts/jquery-1.12.0.min.js"></script>
<link type="text/css" href="TAMS_PH/Scripts/toastr/toastr.min.css" rel="Stylesheet" />
<script type="text/javascript" src="../../Scripts/toastr/toastr.min.js"></script>
<link type="text/css" href="TAMS_PH/Scripts/tipsy/src/stylesheets/tipsy.css" rel="Stylesheet" />
<script type="text/javascript" src="../../Scripts/tipsy/src/javascripts/jquery.tipsy.js"></script>
<script type="text/javascript" src="../../Scripts/moment.min.js"></script>
<script type="text/javascript" src="../../Scripts/IE8Compatibility/excanvas.js"></script>
<script type="text/javascript" src="../../Scripts/IE8Compatibility/html5shiv.min.js"></script>
<script type="text/javascript" src="../../Scripts/IE8Compatibility/respond.min.js"></script>
<link type="text/css" href="TAMS_PH/Styles/normalize.css" rel="Stylesheet" />
<script type="text/javascript" src="../../Scripts/HRIS/HRIS.js"></script>
<script src="../../Scripts/owl-carousel/owl.carousel.js" type="text/javascript"></script>
<link rel="Stylesheet" href="../../Scripts/owl-carousel/owl.carousel.css" type="text/css" />
<link rel="Stylesheet" href="../../Scripts/owl-carousel/owl.theme.css" type="text/css" />
<link rel="Stylesheet" href="../../Scripts/owl-carousel/owl.transitions.css" type="text/css" />
请注意href标记带有&#34; TAMS_PH&#34;,单击该链接时可以访问该标记。但是,href标签带有&#34; ../../"它说&#34; 404 - 找不到文件或目录。&#34;。
为什么当文件在一个目录中并且可以在dev中访问时,我会收到错误404?
请注意&#34; TAMS_PH&#34;是Web应用程序名称。而且我们不想创建另一个具有不同端口的网站。就在IIS的默认网站内。