Share via


Using Visual Studio 2005/2008 To Generate Load Against a Two-Way Request-Response WCF Receive Location: ERRATA CORRIGE

Today, while I was driving south to Tuscany, I realized that my post had the following defects:

  • I forgot to include the text of the configuration file used by the project;
  • The code of the HandleException and CloseObjects methods had some imperfections, so I fixed it;
  • One of you (Pablo Alarcon Garcia, thanks mate!) dropped me an email to inform me that I committed a very common error in C#: I used "throw ex;" command rather than "throw;" to re-throw an exception within every catch block of the InvokeTwoWayWCFReceiveLocation method. Indeed, this is not really an error as the value of the exception properties (Message, InnerException, etc.) is preserved when using a “throw ex;” command. Conversely, the value of the StackTrace property is reinitialized to refer the “throw ex;” command within the catch block instead of the line of code that originally raised the exception. If you want to re-throw the exception currently handled by a catch block and preserve the value of its StackTrace property, use the throw statement without arguments: "throw ex;".  See the following link for more information on this topic.

So I corrected my post and uploaded the new code here. Sorry folks. :-)