SqlClient error after updating Windows - “The incoming tabular data stream (TDS) remote procedure call > (RPC) protocol stream is incorrect”

本小妞迷上赌 提交于 2019-11-30 20:04:00

My name is Peter Carlin and I work in the SQL Server team. I first want to apologize for this incident and the impact on users of .NET Framework 4.7.2. I next want to explain what happened and how Microsoft is fixing it in more detail.

The issues is due to improvements to the Always Encrypted functionality in SQL. These improvements expand the set of operations that can be done in Always Encrypted, however they are not yet ready for applications to use. These improvements involve changes to both SqlClient and SQL server side. We introduced an error in .NET Framework 4.7.2 such that in some circumstances (related to MARS) SqlClient incorrectly thinks the added functionality is in use and sends invalid requests to SQL. SQL rejects those with the error messages seen in this thread. This only happens if connected to a SQL server that has support for the added functionality as well. SQL DB is the first to get the latest SQL changes, and recently deployed the added functionality.

Our immediate fix is to ensure the SQL DB acts as if it does not have the added functionality, so the SqlClient side bug in 4.7.2 is not encountered. This is why we are able to fix the issue with a SQL DB side change.

We are working as quickly as wise/safe to deploy, validate, the fix. At this point the fix is deployed to approximately 10% of our production capacity, with expected completion by Monday May 21st.

We are investigating this as a possible regression on SqlClient on .NET Framework. Anyone that can provide a repro project, pelase post it at https://github.com/Microsoft/dotnet/issues/749.

Temp Workaround: Per ChainbridgeTech change MultipleActiveResultSets from TRUE to FALSE in my connection string, and the error stops.

This has been reported and is being worked on. They still need a repro and I'm still working on isolating shareable data that I can make public:

https://github.com/Microsoft/dotnet/issues/749

Duplicate issue of TDS Error on Azure Entity Framework SQL Calls after Windows 10 April 2018 Update

Microsoft is actively looking at this issue. Based on what we know so far, the issue is related to .NET framework 4.7.2 with MARS (Multiple Active Result Sets) when using async/await.

Known workarounds include rolling back the Windows/.NET framework update, not using MARS or not using async/await.

If you have additional information that can help us to narrow it down, please add to the issue report at https://github.com/Microsoft/dotnet/issues/749

The solution for me was to convert the query that was dying from using .Include to .IncludeOptimized and it now works.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!