相关疑难解决方法(0)

无法加载资源:服务器响应状态为404(未找到)

我无法解决我的链接问题.你能帮忙解决这个问题,将CSS和JS文件联系起来吗?

CSS:

<link  href="../Jquery/jquery.multiselect.css" rel="stylesheet"/>
<link  href="../Jquery/style.css" rel="stylesheet" />
<link  href="../Jquery/prettify.css" rel="stylesheet" />
Run Code Online (Sandbox Code Playgroud)

JS:

<script  src="../Jquery/jquery.multiselect.js"></script>
<script  src="../Jquery/prettify.js"></script>
Run Code Online (Sandbox Code Playgroud)

错误:

Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/jquery.multiselect.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/style.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.css
Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/jquery.multiselect.js
Failed …
Run Code Online (Sandbox Code Playgroud)

html javascript css relative-path

56
推荐指数
4
解决办法
73万
查看次数

ASP.NET MVC中的500内部服务器错误

我在ASP.NET MVC工作.我正在使用部分视图,但当我点击特定链接时,我收到以下错误.

500内部服务器错误

如何解决这个错误?

asp.net-mvc

24
推荐指数
3
解决办法
7万
查看次数

无法在主机上加载程序集WebPages.Deployment版本2?

我有一个ASP.NET MVC 2网站(VS2010),我已升级到ASP.NET MVC 3(VS2012),这可以在本地IIS7上运行,但在发布时我在主机上得到此异常:

 Could not load file or assembly 'System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)

在一些seartch之后,我发现表明我应该在一些引用上设置CopyLocal(包含System.Web.WebPages)并且还使用VS2012中的发布工具,但这会产生以下异常?

Could not load file or assembly 'System.Web.WebPages.Deployment, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.
Run Code Online (Sandbox Code Playgroud)

我找不到任何部署DLL来设置copyLocal?

我该怎么解决这个问题?

iis asp.net-mvc hosting .net-assembly visual-studio

14
推荐指数
1
解决办法
3万
查看次数

错误:远程查看应用程序错误的详细信息

我有2个登录页面:Login.aspx-用于客户登录,xlogin.aspx用于管理员登录我刚刚将我的项目上传到服务器并且所有应用程序页面都运行良好但是当我登录admin xlogin.aspx时我正被转发到admin.aspx页面 - 但我收到此错误:

Server Error in '/' Application.
Runtime Error
Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed remotely (for security reasons). It could, however, be viewed by browsers running on the local server machine.

Details: To enable the details of this specific error message to be viewable on remote machines, please create a <customErrors> tag within a "web.config" configuration file …
Run Code Online (Sandbox Code Playgroud)

sql asp.net connection-string web-config

11
推荐指数
1
解决办法
11万
查看次数

当无法匹配Controller路径时,.NET MVC会抛出500 Server错误而不是404 Not Found

出于某种原因,当将dud URL输入到不存在的文件/目录/控制器时,会引发以下错误:

System.Web.HttpException未找到路径''的控制器或未实现IController System.Web.Mvc.IController> GetControllerInstance(System.Web.Routing.RequestContext,System.Type)

IIS然后遵循常规错误处理并显示适用于500内部服务器错误的页面.应遵循404 Not Found错误处理逻辑. 我正在测试的另一个Web应用程序在找不到路由时不会抛出此HttpException,并正常返回404.那么触发这个HttpException是什么?

为什么以及如何遵循404路由来处理此类错误而不是500? 以下是错误处理的配置.没有其他代码处理错误.那么为什么总会显示500错误呢?就好像默认处理将"无法找到控制器"异常作为错误处理,而实际上它是未找到的.

<system.webServer>
 <httpErrors errorMode="Custom" existingResponse="Replace" defaultPath="/StaticErrors/Default.html" defaultResponseMode="ExecuteURL">
   <clear />
   <error statusCode="404" path="/mvcError/Http404" responseMode="ExecuteURL" />    
   <error statusCode="500" path="/mvcError/Http500" responseMode="ExecuteURL" />     
 </httpErrors>
</system.webServer>
<system.web>
 <customErrors defaultRedirect="/StaticErrors/Default.html" mode="On" redirectMode="ResponseRewrite">
   <error redirect="/mvcError/Http404" statusCode="404" />          
   <error redirect="/mvcError/Http500" statusCode="500" />         
 </customErrors>
</system.web>
Run Code Online (Sandbox Code Playgroud)

失败的请求跟踪显示了这一点.基本上没有路由是圆的,抛出HttpException,500路由处理开始,而不是404.我没有做任何事情来覆盖任何正常的默认行为.在HandleErrorAttribute不添加任何的MVC过滤器.

在此输入图像描述

asp.net asp.net-mvc exception-handling

9
推荐指数
1
解决办法
3512
查看次数

ASP.NET无法摆脱"500-内部服务器错误"

我正在创建一个ASP.NET webage,它可以在CRM 2011中检索和插入数据.一切都很顺利,页面正在部署到服务器并且已准备好进行测试.

突然出现了一个新的变化,在我删除服务器中的文件并重新发布项目后(我知道它不需要,但仍然......)我再也无法访问该网站了.

我得到的只是500-内部服务器错误您正在寻找的资源存在问题,并且无法显示.

我尝试在页面标题上使用debug ="True"打开调试功能,我设置了

<customErrors mode="Off"/>
<compilation debug="true" targetFramework="4.5"/>
Run Code Online (Sandbox Code Playgroud)

在web.config文件中,我也尝试添加

<httpErrors errorMode="Detailed" />
Run Code Online (Sandbox Code Playgroud)

但他们都没有帮助获得更好的错误信息.

我的web.config文件是:

   <?xml version="1.0"?>
<!--
  For more information on how to configure your ASP.NET application, please visit
  http://go.microsoft.com/fwlink/?LinkId=169433
  -->
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
  </configSections>
  <connectionStrings>
    <add name="DefaultConnection" providerName="System.Data.SqlClient" connectionString="Data Source=(LocalDb)\v11.0;Initial Catalog=aspnet-ASP-20130619150943;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnet-ASP-20130619150943.mdf"/>
  </connectionStrings>
  <!--
    For a description of web.config changes for .NET 4.5 see http://go.microsoft.com/fwlink/?LinkId=235367.

    The following …
Run Code Online (Sandbox Code Playgroud)

asp.net iis

7
推荐指数
2
解决办法
2万
查看次数

定义的客户端缓存似乎被忽略了

我不确定我做错了什么,但尽管我尝试了一切,我似乎无法让客户端缓存我的静态资源.

在我的web.config中,我添加了以下条目:

  <staticContent>
    <clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="30.00:00:00" />
  </staticContent>
Run Code Online (Sandbox Code Playgroud)

根据文档,这应该向客户端浏览器发送响应标头,让它知道我们希望将静态内容缓存30天.

如果我使用fiddler查看客户端正在接收的内容,看起来我的web.config添加将被完全忽略.

以下是小提琴手的报道:

Cache-Control: no-cache
Date: Mon, 05 Dec 2011 14:09:44 GMT
Expires: -1
Pragma: no-cache
Vary: Accept-Encoding
Run Code Online (Sandbox Code Playgroud)

我在IIS中没有任何标题覆盖这个,所以我不确定我错过了什么.任何帮助将不胜感激.

model-view-controller asp.net-mvc asp.net-mvc-3

6
推荐指数
1
解决办法
4826
查看次数

"500内部服务器错误." 在IIS应用程序4.0上

我做了一个简单的asp.net Web应用程序,什么都不做.它使用.net framework 2.0(与服务器上的所有其他应用程序一样),但当我将其更改为.net framework 4.0时,我得到"500 - 内部服务器错误".

要更改为4.0,我使用.Net Framework 4.5.2编译(也尝试了4.0),并将IIS中的应用程序池更改为ASP 4.0集成.

我设置web.config来显示错误,但它仍然只是上面的模糊错误消息.我在系统日志中看不到任何错误或警告.我注册了.net framework v4.0.30319.

是什么导致这个?

web.config中:

<?xml version="1.0"?>
<configuration>
  <system.web>
    <compilation strict="false" explicit="true" targetFramework="4.5.2"/>
    <httpRuntime targetFramework="4.5.2"/>
    <customErrors mode="Off">
      <error statusCode="403" redirect="NoAccess.htm"/>
      <error statusCode="404" redirect="FileNotFound.htm"/>
    </customErrors>
    <pages controlRenderingCompatibilityVersion="3.5" clientIDMode="AutoID"/>
  </system.web>
</configuration>
Run Code Online (Sandbox Code Playgroud)

asp.net iis-7.5 windows-server-2008-r2

5
推荐指数
1
解决办法
3004
查看次数

httpRuntime targetFramework ="4.5"导致500 - 内部服务器错误

我正在将mvc4项目转换为4.0到4.5

我需要在web配置中将以下行添加到system.web,但是当我这样做时,我得到500 - 内部服务器错误

 <httpRuntime targetFramework="4.5" />
Run Code Online (Sandbox Code Playgroud)

asp.net asp.net-mvc web-config asp.net-mvc-4 asp.net-4.5

3
推荐指数
1
解决办法
1万
查看次数