September 18, 2009 05:51 by dsandor
I wrote this application a long time ago and found it on a backup drive. As it turns out it was quite useful for those times you are having to (for example) write code that wires up an object to a bunch of user controls and visa versa (yes yes, you should be using data binding)
Code to be attached shortly..
September 12, 2009 01:49 by dsandor
So this was a really weird one. The solution is simple but I figured I’d post it in case someone out there was stumped.
Service cannot be started. System.ArgumentException: Delegate to an instance method cannot have null 'this'.
The problem was with this line of code:
readerThread = new Thread(new ThreadStart(worker.DoWork));
I was instantiating a new thread that executes the DoWork instance method of the ‘worker’ object. The problem was that I failed to instantiate the worker object.
September 11, 2009 07:11 by dsandor
The configuration for the service reference could not be updated due to the following issue: Unrecognized element ‘extendedProtectionPolicy’. (App.config / Web.config)
There does not seem to be a really clear reason why this is happening however it seems to be related to Windows 7. I am not sure if the .NET framework that ships with Win7 has some different setting or template for the WCF configuration policy files but it seems to be the culprit. Maybe the machine.config files are different on Win 7 and the WCF configuration tools use the machine.config as some sort of policy template.
The fix is annoying (because every time you build your solution on Windows 7 and then rebuild on Vista you have to redo this).
Remove the line:
<extendedProtectionPolicy policyEnforcement="Never" />
from both your App/Web.config file on the client and on the WCF server’s Web.config file.