Code Better
-
Recent Posts
Categories
Category Archives: Libraries
Configuring NLog for WCF Services
NLog didn’t cooperate for my WCF services (server side). I finally did manage to get it working, with a few extra steps; this post outlines how to configure NLog to work with WCF services. Continue reading
Finding Circular Dependencies in SQL Server
SQL Server doesn’t allow a cycle of foreign keys, nor two or more paths to cascadingly delete rows from a table. Thankfully, there’s a script you can use to detect at least table reference cycles. Continue reading
Posted in Libraries, Web, Wndows Forms, WPF
Tagged Cascade, Foreign Keys, SQL Server
Leave a comment
Testing Rendered HTML in ASP.NET MVC3
HtmlUnit and IKVM together give you the power to test your ASP.NET MVC3 application. Submit forms, and even verify the resulting HTML! All with a little help from Java, and Steve Anderson. Continue reading
Posted in Libraries, Web
Tagged HtmlUnit, IKVM, integration testing, java, unit testing
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
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
Excel-Style Auto-Filtering List Views in DevExpress
How can you apply Excel-style auto-filtering on list views in DevExpress? It’s surprisingly easy: open up your model, expand Views, select the view you want, and set the ShowAutoFilterRow property (under Behaviour) to true. Instantly, you’ll see a filteration row appear under your table header. And you can use a GUI filter designer! Continue reading
Regular Expression Model Validation in DevExpress
How do you add model-level validation in DevExpress? Very simply, with an attribute; there’s a RuleRequired attribute, and a RuleRegularExpression attribute; the former guarantees null/blank values are not allowed, and the latter allows you to specify a regular expression to validate against the field value. Continue reading
Forcing a Database Update with DevExpress
How can you force DevExpress to update the database? Either change the module versions in the ModuleInfo table, or else obliterate the entire database. Then run the DB Updater (in either case) and it will regenerate the schema. Continue reading