将MVC5项目从一个系统复制到另一个系统后,CSS和JS文件没有加载。 [英] CSS and JS files not loading after I copied my MVC5 project from one system to another.

查看:99
本文介绍了将MVC5项目从一个系统复制到另一个系统后,CSS和JS文件没有加载。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在开发一个MVC5 Web应用程序,我正在使用Visual Studio 2013在我的PC(在Windows 7上运行)上构建它,它在那里工作得很好,但当我将项目复制到我的笔记本电脑(在Windows 10上运行)时css和js文件和所有图片
都不会加载,它会不断抛出错误'无法加载资源:服务器响应状态为500(内部服务器错误)'。我尝试清理
项目并重建,更改端口号并在布局页面中添加js和css文件的链接而不是捆绑它们,但似乎没有任何效果。

解决方案

嗨Rida, 


欢迎来到MSDN论坛。 


但是这个问题更相关到ASP.net网络问题,它有自己的论坛: 


https://forums.asp.net/1146.aspx/1?MVC


无论如何,我有类似的帖子供您参考:


https://stackoverflow.com/questions/10512053/css -images-js-not-loading-in-iis



因为它可能是由 iis设置,您可以参考 Matt 中投票最多的回复。另一种可能性是
窗口权限问题。  



我真的希望它可以提供帮助。



祝你好运, 


Fletcher



I am working on an MVC5 Web Application and I was building it on my PC (running on windows 7) using Visual Studio 2013 and it is working fine there but when I copied the project to my laptop (running on windows 10) the css and js files and all the images would not load and it keeps throwing the error 'Failed to load resource: the server responded with a status of 500 (Internal Server Error)'. I tried cleaning the project and rebuilding, changing port numbers and adding links of js and css files in the layout page instead of bundling them, but nothing seems to work.

解决方案

Hi Rida, 

You are welcome to MSDN forum. 

However this issue is more related to ASP.net web issue which has its own forum for this: 

https://forums.asp.net/1146.aspx/1?MVC

Anyway, I got similar thread for you to refer:

https://stackoverflow.com/questions/10512053/css-images-js-not-loading-in-iis

As it could be caused by iis setting, you may refer to the most vote reply from Matt. And another possibility is the window permissions issue.  

I really hope it could help.

Best regards, 

Fletcher


这篇关于将MVC5项目从一个系统复制到另一个系统后,CSS和JS文件没有加载。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆