Webform1.aspx.cs में:एप्लिकेशन_इरर आग नहीं है?
protected void Page_Load(object sender, EventArgs e)
{
throw new Exception("test exception");
}
Global.asax.cs में:
protected void Application_Error(object sender, EventArgs e)
{
// Code that runs when an unhandled error occurs
if (Server.GetLastError() is HttpUnhandledException)
Server.Transfer("ErrUnknown.aspx");
}
लेकिन Application_Error ईवेंट हैंडलर कभी नहीं कहा जाता हो जाता है। इसके बजाय मुझे रनटाइम त्रुटि पृष्ठ मिलता है।
अपवाद के बाद एप्लिकेशन_इरर को कॉल करने के लिए मुझे क्या करना है?
कस्टम वेब अनुभाग के लिए आपका web.config क्या कहता है? – Rich
कुछ भी नहीं। क्या आप कस्टमइरर्स सेक्शन का जिक्र कर रहे हैं? – ChrisPeeters
हां, यह संकलन भी जांचें डीबग = ट्रू [सेट] (http://msdn.microsoft.com/en-us/library/e8z01xdh%28v=vs.80%29.aspx) – Rich