How can I solve a connection pool problem between ASP.NET and SQL Server?

In most cases connection pooling problems are related to connection leaks. Your application probably doesn’t close its database connections correctly and consistently. When you leave connections open, they remain blocked until the .NET garbage collector closes them for you by calling their Finalize() method. You want to make sure that you are really closing the … Read more

Databinding an enum property to a ComboBox in WPF

You can create a custom markup extension. Example of usage: enum Status { [Description(“Available.”)] Available, [Description(“Not here right now.”)] Away, [Description(“I don’t have time right now.”)] Busy } At the top of your XAML: xmlns:my=”clr-namespace:namespace_to_enumeration_extension_class and then… <ComboBox ItemsSource=”{Binding Source={my:Enumeration {x:Type my:Status}}}” DisplayMemberPath=”Description” SelectedValue=”{Binding CurrentStatus}” SelectedValuePath=”Value” /> And the implementation… public class EnumerationExtension : MarkupExtension … Read more

Entity Framework and Connection Pooling

Connection pooling is handled as in any other ADO.NET application. Entity connection still uses traditional database connection with traditional connection string. I believe you can turn off connnection pooling in connection string if you don’t want to use it. (read more about SQL Server Connection Pooling (ADO.NET)) Never ever use global context. ObjectContext internally implements … Read more

.NET Standard vs .NET Core

I will try to further clarify your doubts and extend Jon Skeet answer. .NET Standard is a specification, so a library compiled for a specific .NET Standard version can be used in different .NET Standard implementations. As said in my other comment, a good analogy for the relationship between .NET Standard and other .NET Standard … Read more

What is the correct way to make a custom .NET Exception serializable?

Base implementation, without custom properties SerializableExceptionWithoutCustomProperties.cs: namespace SerializableExceptions { using System; using System.Runtime.Serialization; [Serializable] // Important: This attribute is NOT inherited from Exception, and MUST be specified // otherwise serialization will fail with a SerializationException stating that // “Type X in Assembly Y is not marked as serializable.” public class SerializableExceptionWithoutCustomProperties : Exception { public … Read more

How do I detect what .NET Framework versions and service packs are installed?

The registry is the official way to detect if a specific version of the Framework is installed. Which registry keys are needed change depending on the Framework version you are looking for: Framework Version Registry Key —————————————————————————————— 1.0 HKLM\Software\Microsoft\.NETFramework\Policy\v1.0\3705 1.1 HKLM\Software\Microsoft\NET Framework Setup\NDP\v1.1.4322\Install 2.0 HKLM\Software\Microsoft\NET Framework Setup\NDP\v2.0.50727\Install 3.0 HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.0\Setup\InstallSuccess 3.5 HKLM\Software\Microsoft\NET Framework Setup\NDP\v3.5\Install … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)