Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Exception Handling

Exception Handling

Scheduled Pinned Locked Moved C#
csharpquestionwcfdebuggingworkspace
8 Posts 6 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    satsumatable
    wrote on last edited by
    #1

    Hi, I have C# application with WCF service though I have proper Try.. Catch block in my application very rare when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window. What is the best way to configure my application to handle all the run time exception? Is there any configuration need to be set at Web/Application configuration etc ? Thanks

    H R P J R 5 Replies Last reply
    0
    • S satsumatable

      Hi, I have C# application with WCF service though I have proper Try.. Catch block in my application very rare when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window. What is the best way to configure my application to handle all the run time exception? Is there any configuration need to be set at Web/Application configuration etc ? Thanks

      H Offline
      H Offline
      Hiren solanki
      wrote on last edited by
      #2

      satsumatable wrote:

      when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window.

      When you're debugging with VS environment then I think it will always notify you with pop-up block when error occurs though you've specified try..catch..

      satsumatable wrote:

      What is the best way to configure my application to handle all the run time exception?

      It's handling Exception itself, for the need it invented.

      satsumatable wrote:

      Is there any configuration need to be set at Web/Application configuration etc ?

      Nothing just use Try..Catch block and Log the error catched by exception handling. That's it.

      Regards, Hiren.

      My Recent Article: - Way to know which control have raised a postback
      My Recent Tip/Trick: - Building Hierarchy using Recursive CTE

      S 1 Reply Last reply
      0
      • H Hiren solanki

        satsumatable wrote:

        when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window.

        When you're debugging with VS environment then I think it will always notify you with pop-up block when error occurs though you've specified try..catch..

        satsumatable wrote:

        What is the best way to configure my application to handle all the run time exception?

        It's handling Exception itself, for the need it invented.

        satsumatable wrote:

        Is there any configuration need to be set at Web/Application configuration etc ?

        Nothing just use Try..Catch block and Log the error catched by exception handling. That's it.

        Regards, Hiren.

        My Recent Article: - Way to know which control have raised a postback
        My Recent Tip/Trick: - Building Hierarchy using Recursive CTE

        S Offline
        S Offline
        satsumatable
        wrote on last edited by
        #3

        static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { } Will this resolve ?

        H 1 Reply Last reply
        0
        • S satsumatable

          static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e) { } Will this resolve ?

          H Offline
          H Offline
          Hiren solanki
          wrote on last edited by
          #4

          See THIS[^] article for more detailed information.

          Regards, Hiren.

          My Recent Article: - Way to know which control have raised a postback
          My Recent Tip/Trick: - Building Hierarchy using Recursive CTE

          1 Reply Last reply
          0
          • S satsumatable

            Hi, I have C# application with WCF service though I have proper Try.. Catch block in my application very rare when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window. What is the best way to configure my application to handle all the run time exception? Is there any configuration need to be set at Web/Application configuration etc ? Thanks

            R Offline
            R Offline
            Rob Philpott
            wrote on last edited by
            #5

            Sounds like you've got first chance exception-handling switched on in Visual Studio. Visual studio normally breaks on an unhandled exception, but you can change a setting so it happens 'first chance' on all exceptions, so even though you've got an exception block (which will still work just fine if you hit F5) it will break there none-the-less. Have a look in your Debug->Exceptions menu.

            Regards, Rob Philpott.

            1 Reply Last reply
            0
            • S satsumatable

              Hi, I have C# application with WCF service though I have proper Try.. Catch block in my application very rare when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window. What is the best way to configure my application to handle all the run time exception? Is there any configuration need to be set at Web/Application configuration etc ? Thanks

              P Offline
              P Offline
              Pete OHanlon
              wrote on last edited by
              #6

              satsumatable wrote:

              What is the best way to configure my application to handle all the run time exception?

              You can't catch all runtime exceptions. If your application causes a stack overflow, or you run out of memory, the application is terminated immediately without going to the exception handler.

              I'm not a stalker, I just know things. Oh by the way, you're out of milk.

              Forgive your enemies - it messes with their heads

              My blog | My articles | MoXAML PowerToys | Onyx

              1 Reply Last reply
              0
              • S satsumatable

                Hi, I have C# application with WCF service though I have proper Try.. Catch block in my application very rare when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window. What is the best way to configure my application to handle all the run time exception? Is there any configuration need to be set at Web/Application configuration etc ? Thanks

                J Offline
                J Offline
                jschell
                wrote on last edited by
                #7

                satsumatable wrote:

                have C# application with WCF service though I have proper Try.. Catch block in my application very rare when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window

                There are three cases that can cause that. 1. Exceptions that cannot be caught. There are three of those, out of memory, stack overflow and an odd ball one that I can't remember and probably has nothing to do with your problem. 2. Exceptions that exits a thread block excluding the specific thread specific ones like interrupt. Any such exception will cause an application exit. The way to prevent this is to insure that all threads have try/catch at the top level. This includes asynchronous methods. And that might be the cause of your problem. 3. Unmanaged code and/or net errors. The second of these would be outside your control. The first means that you are using unmanaged code so presumably you would be aware of that. Also note that AppDomain.UnhandledException will NOT prevent an application exit. All it does is provide a place for you to log what the exception was.

                1 Reply Last reply
                0
                • S satsumatable

                  Hi, I have C# application with WCF service though I have proper Try.. Catch block in my application very rare when my application crashes or something that sort it didn't get into Catch Block and simply pop-up .Net debug window. What is the best way to configure my application to handle all the run time exception? Is there any configuration need to be set at Web/Application configuration etc ? Thanks

                  R Offline
                  R Offline
                  ramit singh
                  wrote on last edited by
                  #8

                  Try Windward Reports. With Windwards Microsoft Word, Excel or PowerPoint can be used as your layout. Windwards Report http://www.windwardreports.com/csharp.htm[^] is very use to use and is super fast.Various different operations can be used quite easily which are difficult with other tools. For more details please go to : http://www.windwardreports.com/csharp.htm[^]

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups