<small id='QSSs6'></small><noframes id='QSSs6'>

    <tfoot id='QSSs6'></tfoot>

    1. <i id='QSSs6'><tr id='QSSs6'><dt id='QSSs6'><q id='QSSs6'><span id='QSSs6'><b id='QSSs6'><form id='QSSs6'><ins id='QSSs6'></ins><ul id='QSSs6'></ul><sub id='QSSs6'></sub></form><legend id='QSSs6'></legend><bdo id='QSSs6'><pre id='QSSs6'><center id='QSSs6'></center></pre></bdo></b><th id='QSSs6'></th></span></q></dt></tr></i><div id='QSSs6'><tfoot id='QSSs6'></tfoot><dl id='QSSs6'><fieldset id='QSSs6'></fieldset></dl></div>
          <bdo id='QSSs6'></bdo><ul id='QSSs6'></ul>
        <legend id='QSSs6'><style id='QSSs6'><dir id='QSSs6'><q id='QSSs6'></q></dir></style></legend>

        LINQ to SQL:TargetInvocationException 中包装的间歇性 AccessViolatio

        LINQ to SQL: intermittent AccessViolationException wrapped in TargetInvocationException(LINQ to SQL:TargetInvocationException 中包装的间歇性 AccessViolationException)

          <tbody id='REvHe'></tbody>

      1. <small id='REvHe'></small><noframes id='REvHe'>

        1. <legend id='REvHe'><style id='REvHe'><dir id='REvHe'><q id='REvHe'></q></dir></style></legend>

            <i id='REvHe'><tr id='REvHe'><dt id='REvHe'><q id='REvHe'><span id='REvHe'><b id='REvHe'><form id='REvHe'><ins id='REvHe'></ins><ul id='REvHe'></ul><sub id='REvHe'></sub></form><legend id='REvHe'></legend><bdo id='REvHe'><pre id='REvHe'><center id='REvHe'></center></pre></bdo></b><th id='REvHe'></th></span></q></dt></tr></i><div id='REvHe'><tfoot id='REvHe'></tfoot><dl id='REvHe'><fieldset id='REvHe'></fieldset></dl></div>
                <bdo id='REvHe'></bdo><ul id='REvHe'></ul>
              • <tfoot id='REvHe'></tfoot>

                  本文介绍了LINQ to SQL:TargetInvocationException 中包装的间歇性 AccessViolationException的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  几周以来,我们的 ASP.Net Web 应用程序遇到了 W3WP 崩溃问题.这些是在我们的网络服务器更新后开始的.我们的应用程序没有改变,并且多年来一直很稳定.
                  我们的情况似乎很像这个较早的问题.这个问题也可能是相关的,尽管在我们的例子中,查询在 99.9% 的使用时间内运行良好.

                  Since a few weeks we are experiencing W3WP-crashes with our ASP.Net web application. These started after our webservers were updated. Our application did not change and has been stable for years.
                  Our situation seems to be a lot like this earlier question. And this question might also be related, though in our case the queries run fine in 99.9% of the times used.

                  我们使用了大量未编译的 LINQ 查询,并尝试编译它们是否可以防止这些崩溃.崩溃的数量急剧减少,但它们仍然会发生.

                  We use a lot of uncompiled LINQ queries and tried if compiling them would prevent these crashes. The number of crashes decreased drastically, but they still do occur.

                  同样将我们的查询包装在 try catch 中,然后捕获 TargetInvocationException 也不起作用.未捕获异常.

                  Also wrapping our queries in a try catch and then catching the TargetInvocationException does not work. The exception is not caught.

                  发生崩溃时,我们会收到 WER 报告并可以检索崩溃转储.
                  来自未编译查询的转储的堆栈跟踪通常如下所示:

                  When a crash happens, we get a WER-report and can retreive a crash dump.
                  A stack trace from a dump for an uncompiled query typically looks like this:

                  在 System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
                  在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(对象 obj,对象 [] 参数,对象 [] 参数)
                  在 System.Delegate.DynamicInvokeImpl(Object[] args)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInvocation(InvocationExpression 调用)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInner(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitExpression(Expression exp)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitBinary(BinaryExpression b)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInner(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitExpression(Expression exp)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitBinary(BinaryExpression b)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInner(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.Visit(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitWhere(表达式序列,LambdaExpression 谓词)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInner(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitWhere(表达式序列,LambdaExpression 谓词)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInner(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitSelect(表达式序列,LambdaExpression 选择器)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInner(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitDistinct(表达式序列)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  在 System.Data.Linq.SqlClient.QueryConverter.VisitInner(表达式节点)
                  在 System.Data.Linq.SqlClient.QueryConverter.ConvertOuter(表达式节点)
                  在 System.Data.Linq.SqlClient.SqlProvider.BuildQuery(表达式查询,SqlNodeAnnotations 注释)
                  在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(表达式查询)
                  在 System.Data.Linq.DataQuery'1.System.Collections.Generic.IEnumerable.GetEnumerator()
                  在 System.Linq.Buffer'1..ctor(IEnumerable'1 源)
                  在 System.Linq.Enumerable.ToArray[TSource](IEnumerable'1 源)

                  at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
                  at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
                  at System.Delegate.DynamicInvokeImpl(Object[] args)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInvocation(InvocationExpression invoke)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInner(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitExpression(Expression exp)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitBinary(BinaryExpression b)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInner(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitExpression(Expression exp)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitBinary(BinaryExpression b)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInner(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.Visit(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitWhere(Expression sequence, LambdaExpression predicate)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInner(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitWhere(Expression sequence, LambdaExpression predicate)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInner(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitSelect(Expression sequence, LambdaExpression selector)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInner(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitDistinct(Expression sequence)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitSequenceOperatorCall(MethodCallExpression mc)
                  at System.Data.Linq.SqlClient.QueryConverter.VisitInner(Expression node)
                  at System.Data.Linq.SqlClient.QueryConverter.ConvertOuter(Expression node)
                  at System.Data.Linq.SqlClient.SqlProvider.BuildQuery(Expression query, SqlNodeAnnotations annotations)
                  at System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query)
                  at System.Data.Linq.DataQuery'1.System.Collections.Generic.IEnumerable.GetEnumerator()
                  at System.Linq.Buffer'1..ctor(IEnumerable'1 source)
                  at System.Linq.Enumerable.ToArray[TSource](IEnumerable'1 source)

                  已编译查询的转储中的堆栈跟踪如下所示:

                  The stack trace from a dump for a compiled query looks like:

                  在 System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
                  在 System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
                  在 System.Delegate.DynamicInvokeImpl(System.Object[])
                  在 System.Data.Linq.SqlClient.SqlProvider.AssignParameters(System.Data.Common.DbCommand, System.Collections.ObjectModel.ReadOnlyCollection`1, System.Object[], System.Object)
                  在 System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expressions.Expression,QueryInfo,System.Data.Linq.SqlClient.IObjectReaderFactory,System.Object[],System.Object[],System.Data.Linq.SqlClient.ICompiledSubQuery[], System.Object)
                  在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression,QueryInfo[],System.Data.Linq.SqlClient.IObjectReaderFactory,System.Object[],System.Data.Linq.SqlClient.ICompiledSubQuery[])
                  在 System.Data.Linq.SqlClient.SqlProvider+CompiledQuery.Execute(System.Data.Linq.Provider.IProvider, System.Object[])
                  在 System.Data.Linq.CompiledQuery.ExecuteQuery(System.Data.Linq.DataContext, System.Object[])

                  at System.RuntimeMethodHandle.InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)
                  at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(System.Object, System.Object[], System.Object[])
                  at System.Delegate.DynamicInvokeImpl(System.Object[])
                  at System.Data.Linq.SqlClient.SqlProvider.AssignParameters(System.Data.Common.DbCommand, System.Collections.ObjectModel.ReadOnlyCollection`1, System.Object[], System.Object)
                  at System.Data.Linq.SqlClient.SqlProvider.Execute(System.Linq.Expressions.Expression, QueryInfo, System.Data.Linq.SqlClient.IObjectReaderFactory, System.Object[], System.Object[], System.Data.Linq.SqlClient.ICompiledSubQuery[], System.Object)
                  at System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(System.Linq.Expressions.Expression, QueryInfo[], System.Data.Linq.SqlClient.IObjectReaderFactory, System.Object[], System.Data.Linq.SqlClient.ICompiledSubQuery[])
                  at System.Data.Linq.SqlClient.SqlProvider+CompiledQuery.Execute(System.Data.Linq.Provider.IProvider, System.Object[])
                  at System.Data.Linq.CompiledQuery.ExecuteQuery(System.Data.Linq.DataContext, System.Object[])

                  有谁知道是什么改变了我们的应用程序的行为?我们知道这是一次更新"(但不完全是哪一次),但我们更感兴趣的是它的技术背景.
                  当然,我们也欢迎提供防止我们的应用程序崩溃的解决方案.

                  Does anyone know what might have changed the behavior our application? We know it was "an update" (but not exactly which one), but we are more interested in it's technical background.
                  Of course, we would also welcome a solution to prevent our application from crashing.

                  推荐答案

                  我想我会发布一个解决方案,我们发现了这个问题,因为我们最近开始遇到这个问题.

                  I thought I would post a solution, that we found to this issue, because we started experiencing the problem recently.

                  我们有许多服务器可以正常运行我们的代码,但只有 1 台每周因此错误而崩溃几次.我相信此服务器位于 .net 4.5.2 上.

                  We have many servers that run our code just fine but only 1 was crashing a couple of times a week with this error. I believe this server was on .net 4.5.2.

                  我们向 Microsoft 开了一张票,因为未处理的异常发生在他们的堆栈中.

                  We opened a ticket with Microsoft since the unhandled exception was happening in their stack.

                  他们查看了我们的转储并返回了这个可行的解决方案.

                  They looked at our dump and came back with this solution which worked.

                  一个新的修复是可用的https://support.microsoft.com/en-us/kb/3139544

                  如果你迁移到 .net 4.6.1 会更好

                  It would be better if you move to .net 4.6.1

                  我希望这个解决方案能帮助其他发现自己正在阅读本文的人.

                  I hope this solution will help anyone else that finds themselves reading this.

                  这篇关于LINQ to SQL:TargetInvocationException 中包装的间歇性 AccessViolationException的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  Force JsonConvert.SerializeXmlNode to serialize node value as an Integer or a Boolean(强制 JsonConvert.SerializeXmlNode 将节点值序列化为整数或布尔值)
                  Using JSON to Serialize/Deserialize TimeSpan(使用 JSON 序列化/反序列化 TimeSpan)
                  Could not determine JSON object type for type quot;Classquot;(无法确定类型“Class的 JSON 对象类型.)
                  How to deserialize a JSONP response (preferably with JsonTextReader and not a string)?(如何反序列化 JSONP 响应(最好使用 JsonTextReader 而不是字符串)?)
                  how to de-serialize JSON data in which Timestamp it-self contains fields?(如何反序列化时间戳本身包含字段的JSON数据?)
                  JSON.Net custom contract serialization and Collections(JSON.Net 自定义合约序列化和集合)

                      <tbody id='3b5vl'></tbody>

                    • <i id='3b5vl'><tr id='3b5vl'><dt id='3b5vl'><q id='3b5vl'><span id='3b5vl'><b id='3b5vl'><form id='3b5vl'><ins id='3b5vl'></ins><ul id='3b5vl'></ul><sub id='3b5vl'></sub></form><legend id='3b5vl'></legend><bdo id='3b5vl'><pre id='3b5vl'><center id='3b5vl'></center></pre></bdo></b><th id='3b5vl'></th></span></q></dt></tr></i><div id='3b5vl'><tfoot id='3b5vl'></tfoot><dl id='3b5vl'><fieldset id='3b5vl'></fieldset></dl></div>
                      <tfoot id='3b5vl'></tfoot>
                        <bdo id='3b5vl'></bdo><ul id='3b5vl'></ul>
                        • <legend id='3b5vl'><style id='3b5vl'><dir id='3b5vl'><q id='3b5vl'></q></dir></style></legend>
                          1. <small id='3b5vl'></small><noframes id='3b5vl'>