The incoming TDS protocol stream is incorrect' error requiring IIS restart

203 Views Asked by At

I'm working on an ASP.NET Core 2.0.8 application, and it has been running smoothly. However, I'm facing an intermittent issue with all of my APIs. Occasionally, when I call this API, it returns an error, and the only way to resolve it is by restarting IIS.

Here's the error message I'm encountering:

{ "errors": [ "The incoming tabular data stream (TDS) protocol stream is incorrect. The MARS TDS header contained errors." ] }

Has anyone else experienced this error with ASP.NET Core? I've already set MultipleActiveResultSets=False;and MultipleActiveResultSets=True; in my web.config, but the issue persists.

Configuration and Environment:

  • ASP.NET Core version: 2.0.8
  • Operating System: Windows Server 2016
  • IIS version: 10
  • SQL Server: Microsoft SQL Server 2014
  • Connection string in web.config: MultipleActiveResultSets=False;

** Troubleshooting Steps:**

I've checked my SQL Server configuration to ensure that MARS is enabled client side. I've reviewed my connection strings to ensure MultipleActiveResultSets is set to False. The error seems to occur intermittently, and it's challenging to predict when it will happen. I'd appreciate any insights, suggestions, or solutions to resolve this issue and prevent the need to restart IIS.

What I Tried: I've thoroughly reviewed my code, ensured that my SQL Server configuration has MARS enabled, and set MultipleActiveResultSets to False anf true also in my connection strings. Additionally, I've checked for any potential memory leaks in the API that could be causing this issue. However, despite these efforts, the problem still occurs intermittently.

Expected Outcome: I expected that setting MultipleActiveResultSets to False and verifying the SQL Server configuration would prevent the 'TDS protocol stream is incorrect' error. My expectation was that this change should resolve the issue.

Actual Result: The problem still persists, and I continue to encounter the error sporadically. This is quite frustrating as I have not been able to pinpoint the exact cause of the problem.

0

There are 0 best solutions below