我正在处理使用本地文件系统设置创建的 ASP.net 项目。我正在使用 MVC 和 Jquery。当我在调试模式下运行应用程序时,Jquery 工作正常,即在 ASP.net 开发服务器中。我正在尝试在 IIS 7 中托管应用程序。在托管模式下,它无法识别 Jquery 并给出脚本错误“Jquery 未定义”。脚本文件的位置在两种模式下都没有改变。任何人都可以知道可能是什么原因以及如何解决这个问题。
我的代码如下所示;
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<script src="../../Scripts/MicrosoftAjax.debug.js" type="text/javascript"></script>
<script src="../../Scripts/MicrosoftMvcAjax.debug.js" type="text/javascript"></script>
<script src="../../Scripts/jquery-1.2.6.js" type="text/javascript"></script>
<!-- YUI Styles -->
<link href="../../Content/reset.css" rel="stylesheet" type="text/css" />
<link href="../../Content/fonts.css" rel="stylesheet" type="text/css" />
<link href="../../Content/grids.css" rel="stylesheet" type="text/css" />
<!-- /YUI Styles -->
<link href="../../Content/knowledgebase.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
//this hides the javascript warning if javascript is enabled
(function($) {
$(document).ready(function() {
$('#jswarning').hide();
});
})(jQuery);
</script>
<asp:ContentPlaceHolder ID="ScriptContent" runat="server" />
……