539 questions
1 vote
2 answers
5k views
Inserting list records in database with stored procedures
I have a list of records inserting into a SQL Server database using a stored procedure. Currently I am doing it this way but is there any better way? I am inserting 100-200 rows per/sec on peak hours ...
10 votes
6 answers
11k views
Could not load file or assembly Microsoft.Data.SqlClient, Version=5.0.0.0
Facing following issue after deploying app to azure app service: Unhandled exception. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.Data.SqlClient, Version=5.0.0.0, ...
-3 votes
2 answers
15k views
How to fix "An unhandled exception occurred during the execution of the current web request. "
I am trying to host an Asp.Net website with a database. It's giving me an error, of can't open the database I have tried to change the connection string but to no avail. This is the connection ...
-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
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....
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....
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 ...
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
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
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: ...
6 votes
2 answers
12k views
.NET 6 to SQL Server error, Pre-login handshake failed - [Pre-Login] initialization=21001;
This is not a duplicate of A connection was successfully established with the server, but then an error occurred during the pre-login handshake . I have two applications, one built on .NET Framework 4....
34 votes
7 answers
36k views
dotnet ef update database : A connection was successfully established with the server, but then an error occurred during the login process
When I run dotnet ef update database I get this error: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 ...
5 votes
2 answers
2k views
Intermittent exception against SQL Azure: Unknown error 258
The exception We have a production issue in one customer instance (of eight) that we aren't able to understand (and therefor not able to resolve). The issue happens less then 10 times on 250 calls to ...
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 ...