.NET & MySQL error - A call to SSPI failed … “message received was unexpected or badly formatted” AND “buffers supplied to a function was too small”

别说谁变了你拦得住时间么 提交于 2019-12-03 07:27:59

Check out this https://github.com/mysql-net/MySqlConnector/issues/428

I faced the same error with similar sort of tech stack. An easy fix is to add SslMode=None in your connectionString and it should work.

The second error ("The buffers supplied to a function was too small") is a known issue in the .NET framework. See https://github.com/dotnet/corefx/issues/1854.

One possible workaround is retrying the connection once upon seeing this failure. It solves the problem in the mail sending use case from the GitHub issue, at least.

For what it is worth, I've seen this issue on production systems running Windows Server 2012 R2 but not on production systems running on Windows Server 2016. So I think the underlying issue might be have been fixed inbetween those versions of Windows.

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