Professional Web Applications Themes

How Can I Catch Framework Errors - ASP.NET General

Hello, No one answered this yet, will you By TonyG 8/23/2003 3:45 AM My site uses the fairly standard approach of trapping errors in the Application_Error event and dealing with them there. However, we occasionally get errors that are generated by the Framework itself and are this not trappeable by our ASP.Net code. A good example is if someone requests a page just as the site DLL is being uploaded, an error such as "Cannot access file as it is being used by another process" is generated. These errors are dreadful for a number of reasons. 1). They are butt ...

  1. #1

    Default How Can I Catch Framework Errors

    Hello, No one answered this yet, will you

    By TonyG 8/23/2003 3:45 AM
    My site uses the fairly standard approach of trapping errors in the
    Application_Error event and dealing with them there.

    However, we occasionally get errors that are generated by the Framework
    itself and are this not trappeable by our ASP.Net code.

    A good example is if someone requests a page just as the site DLL is
    being uploaded, an error such as "Cannot access file as it is
    being used by another process" is generated.

    These errors are dreadful for a number of reasons.

    1). They are butt ugly
    2). They contain a plethora of sensitive information including
    details like dll name, appBase, drive paths etc etc.
    3). They do not appear to be trappeable

    MY question is this. How can I catch these pages and deal with them in a
    more graceful manner?

    I NEED to be able to serve a custom page to my users as this page is a
    horror.

    Any help would be very gratefully received.

    --
    Tony G


    MS Guest

  2. #2

    Default Re: How Can I Catch Framework Errors

    "MS News (MS ILM)" <com> wrote in message
    news:phx.gbl... 

    I didn't answer because I don't know of a way to solve the problem.

    In these cases, your application can't handle the problem because in these
    cases, you don't really _have_ an application. Instead, you've got ASP.NET
    complaining about why it can't pass the request to your application.

    The solution would have to be within ASP.NET itself.
    --
    John Saunders
    Internet Engineer
    com


    John Guest

  3. #3

    Default Re: How Can I Catch Framework Errors

    Agree

    "John Saunders" <com> wrote in message
    news:phx.gbl... 
    > output 
    >
    > I'd say it's worth a bug report.
    >
    > If nothing else, maybe they shouldn't be putting sensitive information[/ref]
    into 


    MS Guest

  4. #4

    Default Re: How Can I Catch Framework Errors

    But, i was under the impression that the custom error tag
    under web config file is able to handle application level
    errors also. If u have set the mode to "On", you must be
    able to hide these errors. I have not tried this out
    (since u have pointed that it has not even reached the
    application level).
    May be i will try and let u know.

    thanks and regards,
    s.ravi sankar
     
    message [/ref]
    message [/ref][/ref]
    ErrorHandeling .aspx or .html [/ref][/ref]
    this type of error ( [/ref][/ref]
    of ASP.NET and [/ref][/ref]
    to override the 
    >>
    >> I'd say it's worth a bug report.
    >>
    >> If nothing else, maybe they shouldn't be putting[/ref][/ref]
    sensitive information 
    >
    >
    >.
    >[/ref]
    Ravi Guest

  5. #5

    Default Re: How Can I Catch Framework Errors

    Hi,

    did you try to set customErrors Attributes in the machine.config ?

    Natty Gur, CTO
    Dao2Com Ltd.
    34th Elkalay st. Raanana
    Israel , 43000
    Phone Numbers:
    Office: +972-(0)9-7740261
    Fax: +972-(0)9-7740261
    Mobile: +972-(0)58-888377


    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
    Natty Guest

  6. #6

    Default Re: How Can I Catch Framework Errors

    It works, I was able to get to the custom error page when the .dll is missing
    Here is what you have to do

    1- in web.confg add the following line
    <customErrors mode="On" defaultRedirect="mycustompage.htm"/>

    2- create the mycustompage.htm and place your custom error in there

    3- remove the .dll of your project from the bin directory

    4- Open IE and try to open your project

    5- You will get your Custom Error

    6- Return the .dll back to the bin Directory of your project

    7- Refresh the browser and you still see the custom error

    8- Close I.E.

    9- Reopen IE and open your Project

    10- Back to normal

    That's it, you are done

    conclusion: ASP.NET looks into your web.config first which is good even if you have no .dll in your bin directory

    any other comments are welcome.



    "Natty Gur" <com> wrote in message news:%phx.gbl... 
    MS Guest

  7. #7

    Default Re: How Can I Catch Framework Errors

    "MS News (MS ILM)" <com> wrote in message news:phx.gbl...
    It works, I was able to get to the custom error page when the .dll is missing
    Here is what you have to do

    1- in web.confg add the following line
    <customErrors mode="On" defaultRedirect="mycustompage.htm"/>

    2- create the mycustompage.htm and place your custom error in there

    3- remove the .dll of your project from the bin directory

    4- Open IE and try to open your project

    5- You will get your Custom Error

    6- Return the .dll back to the bin Directory of your project

    7- Refresh the browser and you still see the custom error

    8- Close I.E.

    9- Reopen IE and open your Project

    10- Back to normal

    That's it, you are done

    conclusion: ASP.NET looks into your web.config first which is good even if you have no .dll in your bin directory

    any other comments are welcome.

    Thanks for trying that out. I had never considered making the custom error page a .html file.
    --
    John Saunders
    Internet Engineer
    com

    John Guest

  8. #8

    Default Re: How Can I Catch Framework Errors

    Thank you for all your input.

    "John Saunders" <com> wrote in message news:phx.gbl...
    "MS News (MS ILM)" <com> wrote in message news:phx.gbl...
    It works, I was able to get to the custom error page when the .dll is missing
    Here is what you have to do

    1- in web.confg add the following line
    <customErrors mode="On" defaultRedirect="mycustompage.htm"/>

    2- create the mycustompage.htm and place your custom error in there

    3- remove the .dll of your project from the bin directory

    4- Open IE and try to open your project

    5- You will get your Custom Error

    6- Return the .dll back to the bin Directory of your project

    7- Refresh the browser and you still see the custom error

    8- Close I.E.

    9- Reopen IE and open your Project

    10- Back to normal

    That's it, you are done

    conclusion: ASP.NET looks into your web.config first which is good even if you have no .dll in your bin directory

    any other comments are welcome.

    Thanks for trying that out. I had never considered making the custom error page a .html file.
    --
    John Saunders
    Internet Engineer
    com

    MS Guest

Similar Threads

  1. help with try...catch errors
    By DFord425 in forum Macromedia Flex General Discussion
    Replies: 12
    Last Post: June 27th, 03:57 PM
  2. framework referencing framework?
    By Mike in forum Mac Programming
    Replies: 3
    Last Post: January 26th, 04:56 PM
  3. How to catch errors
    By oj in forum Microsoft SQL / MS SQL Server
    Replies: 2
    Last Post: July 6th, 10:21 PM
  4. The best way to catch errors
    By Gennady Bystritsky in forum Ruby
    Replies: 1
    Last Post: July 5th, 06:11 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139