SYSK 385: Smart Cache

John Manaloto, one of the architects I’ve worked with recently, has been kind enough to allow me to publish the “smart cache” class he’s put into one of his projects…  It’s a component built on top of Microsoft Caching Application Block from the enterprise library, but it has an additional capability of actually getting the…


SYSK 383: FileSync Tool

Last weekend I wrote a utility that does file synchronization (yes, I know there many such tools), but where I can define in advance what I want to see happen if there are discrepancies, e.g.: If you think you might benefit from it, attached is the source code and the executable (in the bin\debug folder). …

2

SYSK 382: File Comparison

Last weekend I wrote a utility that does file synchronization (yes, I know there many such tools), but where I can define in advance what I want to see happen if there are discrepancies…  To do that, I needed a class that would take an array of file names from one folder and another array…

4

SYSK 381: How To Get One Callback When Multiple Async Services Calls are Completed

My current project uses Silverlight 4.0 and RIA services, and I quickly came to realize the benefits and the challenges of all DomainService calls being asynchronous.    Consider this scenario: a Silverlight client app needs to get some data, that requires multiple DomainService calls – it may be because upon “processing” the first resultset, the…


SYSK 380: How to Get Rid of Double Scroll Bar in Microsoft Report Viewer Control

Special thanks to David Petersen who has submitted this post!   If you ASP.NET page that contains the Report Viewer Control, has double scroll bars, you can remove them by including two separate form elements on the page: 1.    First <form> element Includes your Headers and so forth (notice the absence of runat=”server” attribute in…

3

SYSK 376: Utility to Add DateTaken as File Name Prefix

I like to view photo images (.jpg files) using Large or Extra Large Icons view in Windows Explorer.  Unfortunately, this view doesn’t give me a way to sort the files by DateTaken property…  So, as a workaround, I created a small application that uses the date/time as a file name prefix, thus, letting the Windows…


SYSK 375: Visual Studio Add-In for Managing Configuration Files Across Environments

One of common customer questions/requests I get is about industry best practices and recommendations on managing configuration file settings when deploying code across environments.    There are several options to change different configuration settings in web.config file based on whether the application is in a DEV, QA, STAGE or PROD environment, and, based on my…

2

SYSK 374: Role Based Authorization for WCF Services through Configuration Files

Traditionally, to implement role based authorization in .NET you would use PrincipalPermission attributes, e.g.:   [PrincipalPermission(SecurityAction.Demand, Name = “YourDomain\\User1”, Role = “YourDomain\\Role1”)] public void MethodX(…) {     . . . }   In my opinion, there are two problems with this approach:   1.    At development time you need to make a decision on which…

1

SYSK 373: How to Impersonate the Original Caller When Calling the WCF Service in ASP.NET by Configuration Only

If your WCF services use role based authorization, and you need to pass the identity of the end user (original caller), you have a few options:   1.    Use <identity impersonate=”true” /> in web.config   This is not my preference since there is quite a bit of overhead with doing security context switching for every…


SYSK 370: The Performance Cost of Extension Methods

First, for those who may not be familiar with this feature, .NET 3.5 allows developers to add methods to existing types without using inheritance or partial classes by creating static methods that can be invoked by using instance method syntax.   When I first heard about this feature, it reminded me of the decorator pattern…

1