我构建了一个使用 ExtJS 的简单 ASP MVC4 应用程序。
我的主视图链接到我的主要employee.js 文件:
<script src="app/employee.js" type="text/javascript"></script>
我正在将我的应用程序发布到本地网络中的服务器。在我的开发机器上,当我访问 urlhttp:\\local-iis\holidays
应用程序时已正确加载并显示。
但是在同一网络中的其他 3 台计算机上,我收到错误,因为浏览器找不到该 js 文件。
我的项目结构如下所示:
--holidays(项目名称) +--应用程序 +--myapp.js +--控制器 +--型号 +--(其余的 ASP 文件夹)
在我的开发机器上,当我访问http:\\local-iis\holidays
chrome 并检查源代码时,我看到以下行:
<script src="app/employee.js" type="text/javascript"></script>
在我翻转那个条目之后
我看到正确的路径:
http:\\local-iis\holidays\app\employee.js (I translated urlopy to holidays)
on other computers for the same page source directory name is removed (holidays
)
I tried clearing cache, installing other browsers, switching to other computers but everything failed-on some computers this is working and on some it isn't.
I'm not asking for specific solution, but something to get started with.
It's my first project in MVC 4 and I don't know how should I configure my application to get those urls working.
I don't know why my application is removing that directory name (it is referring to root of my local-iis server)
I asked on ExtJS forum and they said this is probably IIS or ASP setting issue.