asp.net – Exception has been thrown by the target of an invocation error (mscorlib)

asp.net – Exception has been thrown by the target of an invocation error (mscorlib)

Id suggest checking for an inner exception. If there isnt one, check your logs for the exception that occurred immediately prior to this one.

This isnt a web-specific exception, Ive also encountered it in desktop-app development. In short, whats happening is that the thread receiving this exception is running some asynchronous code (via Invoke(), e.g.) and that code thats being run asynchronously is exploding with an exception. This target invocation exception is the aftermath of that failure.

If you havent already, place some sort of exception logging wrapper around the asynchronous callbacks that are being invoked when you trigger this error. Event handlers, for instance. That ought to help you track down the problem.

Good luck!

This can happen when invoking a method that doesnt exist.

asp.net – Exception has been thrown by the target of an invocation error (mscorlib)

I know its kind of odd but I experienced this error for a c# application and finally I found out the problem is the Icon of the form! when I changed it everything just worked fine.

I should say that I had this error just in XP not in 7 or 8 .

Leave a Reply

Your email address will not be published.