Search
Code Better
-
Recent Posts
Categories
Category Archives: Web
Integrating NUnit with CruiseControl.NET
Interested in using CruiseControl.NET to execute NUnit tasks and integrate the results in the dashboard, without using the nunit task type? You can do it through exec, if you merge the results. This article outlines how. Continue reading
Fetching Connection Strings from App.Config in a Library via ConfigurationManager
System.Configuration.ConfigurationManager doesn’t (easily) allow you to read connection strings from an App.Config file inside a library. You need to add a few extra steps to pull this off, like using KeyValueConfigurationElement. Continue reading
Posted in Core .NET, Web, Wndows Forms
Tagged app.config, connection strings, database
Leave a comment
Using NInject For Compile-Time AOP
An update to my aspect-oriented design pattern for compile-time checking: you can implement aspects as interfaces with singular implementations, and use Ninject to inject the interface implementations. Smooth, easy, and it works! Continue reading
Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF
Tagged aspect-oriented programming, dependency injection, design patterns
Leave a comment
Sending Multiple Updates Through the Updater Block
Adding multiple updates to an updater block manifest is actually quite easy. Simply package every update into its own manifest XML file, reference the manifests from the main/index manifest, and update the ID of the main/index manifest so that clients can tell that changes occurred. That’s it! Continue reading
Posted in Libraries, Silverlight, Web, Wndows Forms
Tagged enterprise library, updater block
Leave a comment
An Overview of the Updater Application Block
The Updater Application Block from Microsoft’s Enterprise Library is not immediately obvious in design. How does it work? We go through the basics. It’s a client-server architecture, which exposes an XML file containing a list of updates — what to download, and what to execute when that’s done. It uses BITS for passive transferring. Continue reading
Posted in Libraries, Silverlight, Web, Wndows Forms
Tagged enterprise library, updater block
Leave a comment
Fixing ApplicationBlocks.Updater Exception in x64
Microsoft Enterprise Library’s Update block throws an exception in 64-bit machines; this is because of the BG_BASIC_CREDENTIALS struct that uses a field offset of 4 instead of 8. Change it to eight, and your exception will vanish. Continue reading
Posted in Libraries, Silverlight, Web, Wndows Forms
Tagged 64-bit, enterprise library, updater block
Leave a comment
Enums, SQL Server, and Null
Ever wonder how to deal with enumerations that might be null? Should you have a “nothing” value? What about SQL Server? As it turns out, enumerations are value types (often represented by integers), which means that they can be nullable! Continue reading
Posted in Core .NET, Silverlight, Web, Wndows Forms, WPF
Tagged enumerations, null, nullable types
Leave a comment
Searching the Entire SQL Server Database
How can you search every row and column in a SQL Server database for a specific string? Well, we link you to a handy dandy SQL stored procedure that does just that! Invoke it, and be amazed! Continue reading
Selecting Encrypted Columns in SQL Server
Decrypting columns in SQL Server requires a security key and security certificate. You need to convert the resulting value into the correct type; we explain the process, and summarize what you need and how to do what you need to do. Continue reading
Aggregate Objects in DevExpress
DevExpress has an amazing feature called “aggregation,” which is not explained terribly well in their documentation. What is aggregation, and how does it work? Simply, aggregation is two things: Cascading Delete: Aggregated objects can’t live without their parents; deleting the … Continue reading