Best Practice – Workflow and Anonymous Delegates

Best Practice Recommendation In your Workflow application (more exactly in the host of your workflow application) never use anonymous delegate like that : AutoResetEvent waitHandle = new AutoResetEvent(false); . . . workflowRuntime.WorkflowTerminated += delegate(object sender, WorkflowTerminatedEventArgs e) { waitHandle.Set(); }; Details The code above is very common and works correctly at least most of the…

2

Best Practice – WCF and Exceptions

Best Practice Recommendation In your WCF service, never let an exception propagate outside the service boundary without managing it. 2 Alternatives then : Either you manage the exception inside the service boundary and never propagate it outside Or you convert the .Net typed exception in your exception manager as a FaultException before propagating it. Details…

1

Best Practice – <GeneratePublisherEvidence> in ASPNET.CONFIG

Best Practice Recommendation Add the following line to your ASPNET.CONFIG or APP.CONFIG file: <?xml version="1.0" encoding="utf-8"?> <configuration> <runtime> <generatePublisherEvidence enabled="false"/> </runtime> </configuration> Note the ASPNET.CONFIG file is located in Framework Directory for the version of the Framework you are using.  For example for a 64-bit ASP.NET application it would be: c:\Windows\Microsoft.NET\Framework64\v2.0.50727 For a 32-bit application…

2