Javascripts files are not found when creating virtual directory
I have a web application which is built using ASP.NET MVC2 on Visual Studio 2008 Everything running fine. Now I want to run the app under the local IIS server. So I have created a virtual directory under default website in IIS. Now When trying to run the application, the login screen should appear and it is appearing. I have these following references inside head tag:
<head runat="server">
<title>TouchCast Login</title>
<link rel="stylesheet" type="text/css" href="../../Scripts/ext-3.2.1/resources/css/ext-all.css" />
<script type="text/javascript" language="jav开发者_如何转开发ascript" src="../../Scripts/ext-3.2.1/adapter/ext/ext-base.js"></script>
<script type="text/javascript" language="javascript" src="../../Scripts/ext-3.2.1/ext-all.js"></script>
<script type="text/javascript" language="javascript" src="../../Scripts/TouchCastMain/login/login.js"></script>
</head>
It seems that the javascripts files are not found. Now when I see the page source using "view source" and click on the links, i see it is saying the error "404 Not found". It happens for the js files but i see the style sheet.
One more observation is: I published my web site and put the files directly under default website without creating a virtual directory, everything works fine.
I am really in hurry. Is there any one who can help me to resolve this issue?
Regards, Mohin
You should use UrlHepler.Content() Method
精彩评论