How To
How to implement an asynchronous socket in C#
By Tan Lee Published on Jan 07, 2025 955
A socket is the endpoint for two-way communication between two processes operating over a network.
How to fix InvalidOperationException: No service for type 'Microsoft.AspNetCore.Identity.UserManager'
By Tan Lee Published on May 11, 2024 4.55K
To resolve the error 'InvalidOperationException: No service for type 'Microsoft.AspNetCore.Identity.UserManager[Microsoft.AspNetCore.Identity.IdentityUser]' has been registered,' follow these steps when customizing ASP.NET Core Identity.
System.InvalidOperationException: Unable to resolve service for type while attempting to activate
By Tan Lee Published on Jan 11, 2025 3.61K
The error System.InvalidOperationException: Unable to resolve service for type while attempting to activate typically occurs in .NET applications when the dependency injection (DI) container is unable to resolve or instantiate a service that is being requested.
Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager'
By Tan Lee Published on May 31, 2024 2.12K
The error "Unable to resolve service for type 'Microsoft.AspNetCore.Identity.RoleManager'" in ASP.NET Core typically occurs when the dependency injection can't find or inject a required service.
How to take a screenshot with Selenium WebDriver
By Tan Lee Published on Jan 10, 2025 501
Taking screenshots in Selenium WebDriver is a key feature for automated testing, allowing testers to capture visual evidence of issues, bugs, or test failures.
Sending JSON in .NET Core
By Tan Lee Published on Jan 10, 2025 337
In .NET Core, the Microsoft.Azure.Storage.Queue package has been replaced with the Azure.Storage.Queues package, and the CloudQueueMessage you used to send messages via queue.AddMessageAsync() has been simplified into the SendMessageAsync(string) method.
Writing Files Asynchronously with Multiple Threads in .NET Core
By Tan Lee Published on Jan 10, 2025 618
When building applications that need to write to a file from multiple threads, it's crucial to ensure thread safety and avoid race conditions.
Manipulating XML Google Merchant Data with C# and LINQ
By Tan Lee Published on Jan 10, 2025 385
When working with data from the Google Merchant Center, you often receive a Google Product Feed, typically in XML format, containing product information.
Set Local Folder for .NET Core in C#
By Tan Lee Published on Jan 10, 2025 363
When developing a .NET Core Worker Service, you can configure the service to run as a Windows Service using the following code.
Solr Search in .NET Core
By Tan Lee Published on Jan 10, 2025 789
.NET Core offers robust support for interacting with the Solr search engine.
Handling 415 Unsupported Media Type in .NET Core API
By Tan Lee Published on Jan 10, 2025 1.6K
In .NET Core APIs, the default content type for incoming requests is application/json.
HttpClient Follow 302 Redirects in .NET Core
By Tan Lee Published on Jan 10, 2025 490
In .NET Core, the HttpClient class does not automatically follow HTTP redirects, including 302 (Found) and 301 (Moved Permanently) responses.