539 questions
-2 votes
1 answer
106 views
Stored procedure fails with transport error message
I could use some help to figure out why my code is failing… I'm trying to execute a stored procedure with 130 parameters. The stored procedure works when I comment out two of the flag bit parameters ...
0 votes
1 answer
62 views
System.DllNotFoundException: Unable to load 'Microsoft.Data.SqlClient.SNI.x86.dll' could not be found - works in one site but not in another?
Suddenly all my websites fails with this error (converted from danish): System.DllNotFoundException: Unable to load 'Microsoft.Data.SqlClient.SNI.x86.dll' could not be found. Using Microsoft.Data....
1 vote
1 answer
154 views
Why does this approach with TarWriter use alot of memory with Streams for files?
I originally posted this question: how-can-i-create-a-tar-file-in-memory-from-several-varbinarymax-columns-stored which was helpful. But I realized we might need to create large .tar files, with files ...
0 votes
0 answers
59 views
How to access the Exception that caused a SQLCLR Exception
I have a SQLCLR scalar function that uses the context connection to read data. Sometimes, the SQL statement being run by the CLR deadlocks. The scalar function itself is being run in a standard stored ...
-1 votes
1 answer
493 views
Aspire SQL Server connection issues
I've recently switched to using Aspire and I'm noticing some strange behaviors. I'm getting the following error when trying to access the database: System.InvalidOperationException: ...
0 votes
0 answers
99 views
Raw SQL access to SQL Server with ASP.NET Core
I am supporting a ASP 2.0 legacy application and want to add some capabilities (HTML editor, PDF generation). Of course these new capabilities do not have a older version of their libraries that I can ...
0 votes
1 answer
124 views
Unity "PlatformNotSupportedException" Error with Microsoft.Data.SqlClient
My goal is to be able to use the Microsoft.Data.SqlClient libraries in my scripts. I imported this library from the NuGet plugin in Unity. When I attempt to run code from this library in my scripts, I ...
0 votes
1 answer
104 views
DacDeploy ScriptDatabaseOptions option is ignored during deployment
I have written a tool to update multiple databases as part of our DEVOPS CI/CD pipeline. This tool works without issue. We are migrating host platforms for our SaaS product, and as part of this, I ...
0 votes
1 answer
117 views
Serilog Not Working After New Azure Release: The type initializer for 'Microsoft.Data.SqlClient.InOutOfProcHelper' threw an exception
I currently am working on a .NET 4.8 project deployed using an Azure pipeline. This project uses Serilog to write logs to a SQL database, and has been doing this for some time. The Serilog logic ...
0 votes
1 answer
66 views
How to redirect a reference to another assembly?
In MAUI application I add a reference to Microsoft.Data.SqlClient in order to work with SQL Server. I also add a Dataset and create some dataadapters. Designer generates the code where it references ...
3 votes
1 answer
179 views
Is SqlException.Number unique for SQL Server exceptions?
In Microsoft.Data.SqlClient/System.Data.SqlClient libraries, the Sql errors returned with the SqlException have a property called Number. In many of StackOverflow questions and other discussions over ...
0 votes
1 answer
285 views
SQL access with Managed Identity - token expiry
We have an app service that connects to Azure SQL using MI. Ever since we migrated to using MI, we are seeing this error: An unhandled exception occured while processing a job: Microsoft.Data....
-2 votes
1 answer
154 views
How to fix "SqlException : A network-related or instance-specific error occurred while establishing a connection to SQL Server. (error: 26) "
My scenario I have a new ASP.NET Core web application and I've connected it to my locally running SQL Server database. I can add migrations and update-database from package console manager without any ...
-1 votes
1 answer
357 views
Connection string for connecting to SQL Server using SqlClient in Blazor hybrid on .NET 8
I have a question. I need use a special user account on SQL Server. This account has a user id and password. When I connect using an app on .NET 4.8, I don't have a problem, but when I try to connect ...
0 votes
1 answer
222 views
Dyamically load platform specific dlls e.g. MicroSoft.Data.SqlClient is not supported on this platform
Microsoft.Data.SqlClient is not supported on this platform Created a class library that is running SQL query using Microsoft.Data.SqlClient. Used DLL of that class library in console app (Including ...