• Threads and exceptions

            <p>
            If the thread method completes its execution, .NET will shutdown the thread gracefully. However, any unhandled exception thrown on the call stack of the thread will terminate not just the thread but also will trigger shutdown of hosting process itself. The one exception to this rule is the <b>ThreadAbortException</b>, which will only terminate the aborted thread. This behavior is a breaking change introduced by .NET 2.0. In contract, .NET 1.1 will only terminate the thread that encountered the unhandled exception. When porting .NET 1.1 applications to .NET 2.0, make sure that your thread methods always catch and handle any exception, otherwise you risk unplanned application termination.
            </p>
    
  • CallExternalMethod

    A workflow can use a activity of type CallExternalMethod. This method is a member of type which addressed with ExteranlDataExchange attribute. To make the method call useful, the parameter of the method should be the information that need to send to client. So the workflow should be responsible to supply the parameters.

  • Initialize a configuration section

    in the configuration file, not config section is defined, you can use the following code to initialize the configuration.

  • RefreshSection not fresh

    ConfigurationManager.RefershSection does not really refresh the section. To refersh, you need to OpenConfiuration and GetSection again. RefreshSection does not have any effect at all.

  • Use KeyValueConfigurationCollection

            <p>
            AppSettings mapped to <appSettings&lg; section in the config file, if we want similar settings but we don't want to put our setting in the appSettings, we can create a new tag in the configuration file,  but we use the same ConfigurationSection  Type to handle that.
            </p>