Run the application in VS in debug mode, break it when the exception is thrown, and see the call stack (Debug->Windows->Call Stack). It should help you find the actual problem.