"异常被抛出通过调用&QUOT的目标;错误(mscorlib程序) [英] "Exception has been thrown by the target of an invocation" error (mscorlib)

查看:257
本文介绍了"异常被抛出通过调用&QUOT的目标;错误(mscorlib程序)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在ASP.Net 2.0抛出错误开发了一个网站

I have a website developed in ASP.Net 2.0 that is throwing the error

"Exception has been thrown by the target of an invocation"

在生产环境中。这不是在发展抛出这个错误。

in the production environment. It was not throwing this error in development.

来源是'mscorlib程序',和堆栈跟踪说,在

The source is 'mscorlib', and the stack trace says the error at

System.RuntimeMethodHandle._InvokeMethodFast.

自从我上次上传到生产,我唯一改变的是,我已经使用成员控制(登录,LoginView)开始,并增加了几个存储过程和表格,等等的成员取决于定制供应商我已经写了。

The only thing I've changed since my last upload to production is that I've started using Membership controls (Login, LoginView), and have added a few more stored procedures and tables, etc. The membership depends upon a custom provider I've written.

任何人有一个线索,这可能是为什么发生?

Anybody have a clue why this could be happening?

推荐答案

我建议检查内部异常。如果没有一个,请检查您的日志发生前夕这一个例外。

I'd suggest checking for an inner exception. If there isn't one, check your logs for the exception that occurred immediately prior to this one.

这不是一个具体的网络例外,我也是在桌面应用开发中遇到它。总之,发生的事情是该线程接收此异常运行的是一些异步code(通过的invoke(),例如),并且是被异步运行code与异常爆炸。这个目标调用的例外是失败的后果。

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

如果您有没有准备好,把一些身边,当你触发此错误正在调用的异步回调异常记录包装器。的事件处理程序,例如。这应该帮助你追踪问题。

If you haven't 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.

祝你好运!

这篇关于"异常被抛出通过调用&QUOT的目标;错误(mscorlib程序)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆