异常信息:Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source:System.Web
StackTrace: at System.Web.UI.Page.HandleError(Exception e) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) at System.Web.UI.Page.ProcessRequest() at System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) at System.Web.UI.Page.ProcessRequest(HttpContext context) at ASP.couponmanager_aspx.ProcessRequest(HttpContext context) at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)访问某一页面的时候捕获的错误信息. 其他页面都正常

解决方案 »

  1.   

    这问题很奇特,在本地运行的时候很正常. 发布到服务器上就出现这个错误. 
    这个错误是在global.asax中保存然后显示在页面上的. ASP.NET错误是runtime error
    而且只有这一个页面有这个错误,其他页面都正常
      

  2.   


    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 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>
     
    这个是取消了自定义错误页以后的错误页面
      

  3.   

    或者在程序的最外面写个大的try catch 来扑捉到错误,抛出。