SqlClient
7 Topics"Thread was interrupted from a waiting state" from DbConnectionPool.CleanupCallback
Hi, I'm getting this error, and I'm not able to fix it, or even understand from where it comes. I'm also sure that all my SqlConnection are instanciated with Using (VB.NET), so the Dispose should be called for every one. Does anyone have an idea about the cause? This error started after upgraded the app to the .NET Framework 4.8.1, from 4.6.2. Maybe it's a coincidence... Source: mscorlib; Message: Thread was interrupted from a waiting state.; Data:; StackTrace: at System.Threading.WaitHandle.WaitOneNative(SafeHandle waitableSafeHandle, UInt32 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at System.Threading.WaitHandle.InternalWaitOne(SafeHandle waitableSafeHandle, Int64 millisecondsTimeout, Boolean hasThreadAffinity, Boolean exitContext) at System.Threading.WaitHandle.WaitOne(Int32 millisecondsTimeout, Boolean exitContext) at System.Data.ProviderBase.DbConnectionPool.CleanupCallback(Object state) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx) at System.Threading.TimerQueueTimer.CallCallback() at System.Threading.TimerQueueTimer.Fire() at System.Threading.TimerQueue.FireNextTimers(); Regards, Pedro3.1KViews0likes2CommentsSQL Sever and Apache Log4 vulnerabilities
We use SQL Server 2014 Management Studio, and SQL Server 2015 Reporting Services (SSRS?) on a server that is not owned by us. The operating system is Windows Sever 2012 R2. I did not set up our SQL server. An MS article I found says: SQL Server (on Windows) – all editions Note: If a customer installs Java support and deploys Java Archives (JARs) that depend on the Log4j 2 library, they are advised to upgrade to the latest version or remove the Java Archives (JARs) that require the dependency. Source: https://msrc-blog.microsoft.com/2021/12/11/microsofts-response-to-cve-2021-44228-apache-log4j2/ How do I check if we have installed Java Support? How do I check if we use Java Archives (JARs)? Appreciate any leads.1.6KViews0likes1CommentSQL Server Authentication
I am developing a new windows console app using .Net Core 6 and I have added a reference to System.Data.SQLServer (version 4.8.3) when I go to connect to my Azure SQL database I supply the same connection string that I would when connecting with .NET Framework, however I get an error saying the the authentication parameter is not recognized. Why would this be different? Is there a different process? The parameter is Authentication='Active Directory Integrated'1.2KViews0likes2CommentsDoes the new Cosmos DB patch API gives us enough reasons to rethink about our designs?
One of the most emphasized rules I have learned from my experience when working with Cosmos DB is that, in your documents, you have to separate the parts which change very often from the parts which are rarely updated. Like for instance, likes count in a post or comment. Whilst the posts content, title, author and tags are less likely to change after being set, it ok to put them together in a single document. But to include the post's likes count was not a good practice as every time the post get liked, shared or commented on, you had to update the whole document, which might not be ideal. Edit: I just selected the SqlClient label because there's no Cosmos DB label and I wasn't able to post without a label. 🤷:male_sign:1.1KViews0likes1CommentCannot connect to LocalDB (provider: Named Pipes Provider, error: 0 - No process is at the other end
I'm trying to manually connect to LocalDB (both, SQL Server 2019 and SQL Server 2022 services) creating a new application database using ADO.NET (Microsoft.Data.SqlClient). Everytime I try to connect, I get a generic error telling me that the database file could not be attached. Error.log: 2024-09-17 19:30:18.40 Logon Error: 15350, Severity: 16, State: 1. 2024-09-17 19:30:18.40 Logon An attempt to attach an auto-named database for file C:\Temp\CvTest.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. 2024-09-17 19:31:02.66 Logon Error: 15350, Severity: 16, State: 1. 2024-09-17 19:31:02.66 Logon An attempt to attach an auto-named database for file C:\Temp\CvTest.mdf failed. A database with the same name exists, or specified file cannot be opened, or it is located on UNC share. Debugging into the Microsoft.Data.SqlClient source code, the following error turned out to be the real reason behind the issue: A connection to the server could be established, but an error occurred during the login process. (provider: Named Pipes Provider, error: 0 - No process is at the other end of the pipe). What is causing this error? This is my simple test connection setup. It's a cheap connection string that every Microsoft sample is quoting: using SqlConnection con = new SqlConnection(@"Data Source=(LocalDb)\MSSQLLocalDB;Integrated Security=SSPI;MultipleActiveResultSets=True;AttachDBFilename=C:\Temp\CvTest.mdf"); con.Open(); So, it should work off the cuff. But it doesn't. Using SSMS, I can easily connect to the LocalDB instance and create/delete databases promptly, even with the provided path. I already updated from MsLocalDb 15 to MsLocalDb 16, but to no avail.144Views0likes0CommentsProblem with the startswith function in NET 9
Hi everyone, I have this request with Odata: http://localhost:5194/NationalStates?$filter=startswith(state, 'NE') This works correctly up to version 8.0.14 for the following packages: MySql.EntityFrameworkCore Microsoft.Extensions.DependencyInjection.Abstractions Microsoft.EntityFrameworkCore among others... When I update these packages to version 9.0.0 or later, they stop working and give an internal mapping error. Any clues about this?76Views0likes0Comments