Questions tagged [microsoft-data-sqlclient]

27 questions
0
votes
0 answers

Unknown error 258 has occurred on an ECS Linux container

I had an application that was functioning properly on an IIS server. However, after hosting it on an ECS fargate Linux container and conducting a load test, the ECS task crashes due to the following error: Microsoft.Data.SqlClient.SqlException…
0
votes
1 answer

Microsoft.Data.SqlClient SqlConfigurableRetryLogicConnection in Config Not Applying

I am trying to use an app.config file to apply default Retry Logic to Microsoft.Data.SqlClient following the steps MS advise but when I break into the code and look at the RetryLogicProvider that has been applied to a new instance of SqlConnection…
0
votes
0 answers

What kind of problems can be caused by referencing both Microsoft.Data.SqlClient and System.Data.SqlClient

I was reading the answer to this question about the Microsoft.Data.SqlClient and System.Data.SqlClient which states that "Mixing up data providers isn't fun and should be avoided when possible." I'd like to know what kind of problems could be caused…
0
votes
1 answer

Microsoft.Data.SqlClient.SNI.dll not output by VS build

I'm having trouble bringing in class libraries which have recently been migrated to NetStandard2.0 into an old-style AspNet web application project (framework 4.7.2). The updated assemblies reference NuGet package Microsoft.Data.SqlClient…
Neil Moss
  • 6,598
  • 2
  • 26
  • 42
0
votes
1 answer

SqlBulkCopy WriteToServerAsync using IDataReader

I'm trying to use SqlBulkCopy to insert the contents of the CSV file into SQL Server Database from IDataReader (the specific implementation of the IDataReader is CsvDataReader from CsvHelper package). The following is my code: using (var bulkCopy =…
JohnDiGriz
  • 171
  • 13
0
votes
4 answers

"System.PlatformNotSupportedException: Microsoft.Data.SqlClient is not supported on this platform." on Linux

I just started getting this error today on my Linux system, building a net6 solution on Rider - It builds but won't run. I've tried upgrading my version of Microsoft.Data.SqlClient from nuget but that's made no difference. This was working fine last…
0
votes
0 answers

EF7 Upgrade - Create Database not working

I started to upgrade my .NET 5/6 applications to .NET 7, I also updated from EF6 to EF7, which seems to be more difficult than expected :-( I managed to find out that there were breaking changes in the new SqlClient (5.0.1) library, which now forces…
user2130865
0
votes
0 answers

Microsoft.Data.SqlClient.resources, Version=5.0.0.0, Culture=en-US not found error only when debug in Visual Studio

I am using Microsoft.Data.SqlClient in .NET 6 function app or console app I got this exception break on this line of code using (SqlConnection connection = new SqlConnection(connectionString)), it seems it only throw this exception in debugging…
John Lee
  • 51
  • 1
  • 3
0
votes
1 answer

How to check if Invalid Operation, Error connection is closed is fixed in System.Data.SqlClient

During high load, our app randomly throw this error: System.Data.SqlClient.SqlConnection.GetOpenTdsConnection outerType System.AggregateException outerMessage A Task's exception(s) were not observed either by Waiting on the Task or accessing its…
daxu
  • 3,514
  • 5
  • 38
  • 76
0
votes
1 answer

Exception when using Microsoft.Data.Sqlclient Ado.net with project .Net core 6.0 project library

I have an exception when I use sql.data.client to query database sqlserver : system.platformnotsupportedexception microsoft.data.sqlclient is not supported on this platform My code source : using (var connection = new…
hbib
  • 21
  • 1
  • 1
  • 5
0
votes
1 answer

Microsoft.Data.SqlClient NuGet is needed in some projects but others you can do using Microsoft.Data.SqlClient without the NuGet

In some projects I need to add NuGet package Microsoft.Data.SqlClient to the project before I can do using Microsoft.Data.SqlClient In other projects, I can do that without explicitly adding the NuGet package. The examples below are both .NET 6.0…
Sha
  • 2,185
  • 1
  • 36
  • 61
0
votes
0 answers

Microsoft.Data.SqlClient XmlException on SqlConnection.Open - "Root element is missing"

We have upgraded an application to use Microsoft.Data.SqlClient from System.Data.SqlClient because we need Always Encrypted support. However, upon upgrading it is throwing an exception open attempting to create a new SqlConnection. I've tried…
MgSam
  • 12,139
  • 19
  • 64
  • 95
1
2