handler 方法進不去,服務器上出現應用程序錯誤。此應用程序的當前自定義錯誤設置禁止遠程查看


HTTP/1.1 500 Internal Server Error
Cache-Control: private
Content-Type: text/html; charset=utf-8
Server: Microsoft-IIS/7.5
X-AspNet-Version: 2.0.50727
X-Powered-By: ASP.NET
Date: Mon, 08 Jun 2015 06:27:06 GMT
Content-Length: 2907

<html>
<head>
<title>運行時錯誤</title>
<style>
body {font-family:"Verdana";font-weight:normal;font-size: .7em;color:black;}
p {font-family:"Verdana";font-weight:normal;color:black;margin-top: -5px}
b {font-family:"Verdana";font-weight:bold;color:black;margin-top: -5px}
H1 { font-family:"Verdana";font-weight:normal;font-size:18pt;color:red }
H2 { font-family:"Verdana";font-weight:normal;font-size:14pt;color:maroon }
pre {font-family:"Lucida Console";font-size: .9em}
.marker {font-weight: bold; color: black;text-decoration: none;}
.version {color: gray;}
.error {margin-bottom: 10px;}
.expandable { text-decoration:underline; font-weight:bold; color:navy; cursor:hand; }
</style>
</head>

<body bgcolor="white">

<span><H1>“/”應用程序中的服務器錯誤。<hr width=100% size=1 color=silver></H1>

<h2> <i>運行時錯誤</i> </h2></span>

<font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif ">

<b> 說明: </b>服務器上出現應用程序錯誤。此應用程序的當前自定義錯誤設置禁止遠程查看應用程序錯誤的詳細信息(出於安全原因)。但可以通過在本地服務器計算機上運行的瀏覽器查看。
<br><br>

<b>詳細信息:</b> 若要使他人能夠在遠程計算機上查看此特定錯誤消息的詳細信息,請在位於當前 Web 應用程序根目錄下的“web.config”配置文件中創建一個 &lt;customErrors&gt; 標記。然后應將此 &lt;customErrors&gt; 標記的“mode”屬性設置為“Off”。<br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

&lt;!-- Web.Config 配置文件 --&gt;

&lt;configuration&gt;
&lt;system.web&gt;
&lt;customErrors mode=&quot;Off&quot;/&gt;
&lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

</td>
</tr>
</table>

<br>

<b>注釋:</b> 通過修改應用程序的 &lt;customErrors&gt; 配置標記的“defaultRedirect”屬性,使之指向自定義錯誤頁的 URL,可以用自定義錯誤頁替換所看到的當前錯誤頁。<br><br>

<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>

&lt;!-- Web.Config 配置文件 --&gt;

&lt;configuration&gt;
&lt;system.web&gt;
&lt;customErrors mode=&quot;RemoteOnly&quot; defaultRedirect=&quot;mycustompage.htm&quot;/&gt;
&lt;/system.web&gt;
&lt;/configuration&gt;</pre></code>

</td>
</tr>
</table>

<br>

</body>
</html>

怎么解決類似問題

 

下載fiddler軟件  在服務器上運行就可以查到錯誤  有時在本地運行是好的,發布就不行了,這就需要把發布好的程序在服務器上運行下就好了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM