Problem: .NET COM Interop Events
I've come across a strange problem that I can't seem to solve. I've written a .NET class library for downloading files from the web and exposed it as a COM object. It is asynchronous and exposes events which fire on progress etc. so that any third party application using this library can display download progress in its own way. The problem occurs when I register this library on a production machine using a command similar to this: "RegAsm.exe /register WebLib.dll"
3rd party applications can subscribe to the events I have exposed however as soon as my library attempts to fire any event, the following System.Reflection.TargetException occurs:
"object does not match target type".
As soon as I re-register the class library like this (with the /tlb command) then everything works perfectly:
"RegAsm.exe /register WebLib.dll /tlb"
If any .NET gurus stumble upon this post and have an idea as to why this might be happening I would love to hear from you!
Chris.
How to recursively delete all .pyc files in a directory (and all subdirectories)
find . -name "*.pyc" -exec rm -rf {} \;
ZCML for Storm under Zope3
This was a rookie error, but if you're trying to define the URI to your Sqlite database as an absolute path, don't do this:
<store name="db" uri="sqlite:///var/tmp/test.db"/>
Do this:
<store name="db" uri="sqlite:////var/tmp/test.db"/>