Configuration error. An exception was thrown by the target of the call

I created a custom membership provider that I used in a previous asp.net mvc application with no problem.

Now I am trying to use it in asp.net webforms application and I keep getting config error. An exception was thrown by the target of the call.

There is no stack trace on the error page, and a breakpoint in my membership provider constructor will not hit.

I have read that I need to check for an inner exception to figure out the true problem, but I am having a hard time getting to that point.

+2


source to share


1 answer


This can happen anytime an exception is thrown inside a delegate that has been dynamically called.

Calling the invocation of the delegate throws an exception and ends it in a new Exception.



When you understand this, the InnerException property will appear. This will contain the original exception that was raised from the delegate. If you are debugging an exception, you should be able to see this. The exclusion window will display this information. Alternatively, if you put a breakpoint in an exception handler, you can see information about the exception, including the inner exception, in the locals window.

Once you find the InnerException, you can access the original error as well as the original stack trace.

+6


source







All Articles