C#之路

改变人生
網站調試錯誤

在開發工具中調試正常,一放到本地iis中調試就報下面的錯誤,怎么辦?

 

The XML page cannot be displayed

Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.


A name was started with an invalid character. Error processing resource 'http://localhost/MyWeb/Default.aspx'. Line 1, Pos...

<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
    -^

 

 

 

放到服務器iis就會顯示下面的錯誤

 

Server Error in '/shopfloor' 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 located in the root directory of the current web application. This <customErrors> tag should then have its "mode" attribute set to "Off".

<!-- Web.Config Configuration File -->
            <configuration>
            <system.web>
            <customErrors mode="Off"/>
            </system.web>
            </configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the "defaultRedirect" attribute of the application's <customErrors> configuration tag to point to a custom error page URL.

<!-- Web.Config Configuration File -->
            <configuration>
            <system.web>
            <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
            </system.web>
            </configuration>

 

posted on 2008-07-21 16:41  zhenhgtuag  阅读(703)  评论(6编辑  收藏  举报