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

  • A+

Since updating Windows 10 to 1803, I have begun receiving this error anytime I run an EF query that joins against a table-valued function that takes in a scalar parameter.

Message: The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 2 (""): Data type 0x00 is unknown.

Stack Trace: at System.Data.SqlClient.SqlCommand.<>c.b__180_0(Task1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Data.Entity.Core.EntityClient.Internal.EntityCommandDefinition.d__c.MoveNext()

I am using Entity Framework v6.2 in .NET 4.6 framework projects. I verified that the same code executes without a problem on another computer using Windows 10 1709. I updated the computer to Windows 10 1803 with no other change, and I started getting the error above. Code causing the error:

var query = from fs in db.ViewWithInformation             join e in db.GetEventsForPerson(personnelId) on fs.Event_Id equals e.Event_Id             where !fs.Is_Deleted             select fs; return await query.ToArrayAsync(); 

If I remove the join against db.GetEventsForPerson, the query runs. The SQL generated by the EF query above runs fine in SSMS.

Edit 5/15/2018: I have confirmed that this is specifically caused by .NET Framework 4.7.2. I manaully installed .NET 4.7.2 on my Windows 10 1709 computer, and the error started up again.

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.


:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: