<bdo id='ULlaB'></bdo><ul id='ULlaB'></ul>
  • <small id='ULlaB'></small><noframes id='ULlaB'>

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

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

        <tfoot id='ULlaB'></tfoot>

        访问 SQL Server 的实体框架代码中的访问冲突

        时间:2023-05-21

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

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

          <bdo id='J1cQQ'></bdo><ul id='J1cQQ'></ul>
        • <tfoot id='J1cQQ'></tfoot>

                <tbody id='J1cQQ'></tbody>

                  本文介绍了访问 SQL Server 的实体框架代码中的访问冲突的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  限时送ChatGPT账号..

                  我们在实体框架代码中的测试机器上遇到了访问冲突.我想知道这是否可能是由于线程错误,或者更可能是由于硬件问题.

                  We've encountered an access violation on our test machine, in Entity Framework code. I'm wondering if this could potentially be due to a threading bug, or if it's more likely due to hardware issues.

                  这是一个部分调用堆栈:

                  Here is a partial call stack:

                  System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
                     at System.Data.Common.Internal.Materialization.CoordinatorFactory`1..ctor(Int32 depth, Int32 stateSlot, Expression hasData, Expression setKeys, Expression checkKeys, CoordinatorFactory[] nestedCoordinators, Expression element, Expression elementWithErrorHandling, Expression initializeCollection, RecordStateFactory[] recordStateFactories)
                     --- End of inner exception stack trace ---
                     at System.RuntimeMethodHandle._InvokeConstructor(IRuntimeMethodInfo method, Object[] args, SignatureStruct& signature, RuntimeType declaringType)
                     at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
                     at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
                     at System.Activator.CreateInstance(Type type, Object[] args)
                     at System.Data.Common.Internal.Materialization.CoordinatorScratchpad.Compile()
                  

                  这发生在我们在 IIS 7 (Server 2008 R2 SP1) 上的 ASP.NET 应用程序中,使用 Entity Framework 4 访问 SQL Server 2008 R2.我已经阅读了 EF 和 SQL Server 的访问冲突CE,但我们使用的是完整的 SQL Server.我们没有直接与应用程序中的任何本机代码交互 - 没有 P/Invoke 或 COM 互操作.

                  This happened in our ASP.NET app on IIS 7 (Server 2008 R2 SP1), using Entity Framework 4 to access SQL Server 2008 R2. I've read about access violations with EF and SQL Server CE, but we are using the full SQL Server. We aren't directly interacting with any native code from our app - no P/Invoke or COM interop.

                  这种情况只发生过一次.我个人认为这是机器的问题,而不是应用程序......机器之前已经蓝屏了几次.但我被要求将其作为一个可能的错误进行调查.

                  This has only happened once. Personally I think it's a problem with the machine, not the application... the machine has BSOD'd a couple times before. But I was asked to look into it as a possible bug.

                  如果它再次发生,我会考虑设置 DebugDiag 以捕捉它.有人有其他建议吗?

                  I'll look into setting up DebugDiag to catch this if it happens again. Does anyone have any other suggestions?


                  谢谢,
                  理查德


                  Thanks,
                  Richard

                  推荐答案

                  我想你可能是对的,我猜在同一个工作进程中运行了一些其他代码,导致一些内存损坏导致了这个错误.

                  I think you're probably right, I would guess that there was some other code running in the same worker process which caused some memory corruption that resulted in this error.

                  如果此工作进程中正在运行其他应用程序,您可能需要考虑将此应用程序分离到一个专用工作程序中.除此之外,我会将其归入让我们拭目以待"类别.

                  If there are other applications running in this worker process, you might want to look at separating this application out into a dedicated worker. Other than that I would put it into the "lets just keep an eye out" category.

                  这篇关于访问 SQL Server 的实体框架代码中的访问冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:WP8.1 应用程序在调用 RequestProductPurchaseAsync 时崩溃 下一篇:C# 4.0 编译器崩溃

                  相关文章

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

                      • <bdo id='W13RF'></bdo><ul id='W13RF'></ul>

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