LINQ to SQL: intermittent AccessViolationException wrapped in TargetInvocationException

后端 未结 2 1209
春和景丽
春和景丽 2021-02-13 16:55

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

相关标签:
2条回答
  • 2021-02-13 17:39

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

    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.

    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.

    A new fix is available at https://support.microsoft.com/en-us/kb/3139544

    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.

    0 讨论(0)
  • 2021-02-13 17:39

    Hard to tell without seeing any of your Linq Code but I would venture a wild guess that an it's an internal (casting) error with the linq library you are using.

    As you mentioned that you upgraded recently
    (which .NET version did you upgrade from and to ?)

    I had similar issue which was resolved by installing windows updates, which you say you have done with some resulting success?

    Try to identify the user inputs that cause error. Try to handle the casting yourself rather than relying on Linq

    0 讨论(0)
提交回复
热议问题