If you’ve used Elmah logging in the past then you know it’s a very useful and easy to set up tool in your web applications. However, when we encounter errors in web services we sometimes do not get the desired logging into the xml file or database, depending on how you have Elmah configured. This [...]
Let’s say you have a webpage where you need to call a service but cannot perform a post back. Recently I was on a client engagement where we needed to improve page performance by dynamically loading a navigation tree with a potential for several thousand links. We implemented a solution that would load each branch [...]
In this post, I’ll show you how to create an extension method for the bool class that will simplify your .NET code in XAML-based apps (either WPF or Silverlight). In particular, this extension method addresses the fact that the Visibility property of UI controls in XAML is not a Boolean (true/false) value (as has traditionally [...]
Today’s modern day computers contain multi-core hardware capable of performing multiple tasks simultaneously, also known as parallel processing. Prior to .Net 4.0 the norm was to use synchronous operations to perform multi-threading. Although some level of synchronization logic is needed for data that is shared, the simple .NET 4.0 multi-threading technique presented in this article [...]
Also posted in Enterprise .NET |
While getting acquainted with VS 2010 and .NET 4.0, I’ve come across some improvements that that I’ll be sharing in this blog. Three features in particular are Optional Parameters, Named Parameters and Permanent Redirect.
Before .NET 4.0 one would have to overload methods if they wanted the ability to implement optional parameters. With this latest version [...]
Also posted in Enterprise .NET |
Overview
While SharePoint 2010 supports .NET 3.5, it uses the .NET 2.0 compiler by default for ASP.NET pages. If you write any UserControls or consume any DLLs in your hosted ASPX pages that utilizes .NET 3.5 features such as the var keyword, extension methods, and LINQ, you’ll get compilation error messages when attempting to access those [...]
FILESTREAM is a powerful feature in SQL Server that stores varbinary(max) column data (BLOBs) in the file system (where BLOBs belongs) rather than in the database’s structured file groups (where BLOBs kill performance). This feature was first introduced in SQL Server 2008, and is now being expanded with the new FileTable feature coming in SQL [...]
Practice #1: Catch Exceptions at the Highest Possible Level (Tier)
In general, exceptions should be bubbled up to the highest possible level to be caught and processed. For example, in our project, a search goes through the following logical tiers:
UI -> Services -> Data/SharePoint/Refinement -> Web Services
There are quite a few instances where we’re catching exceptions [...]
I would like to thank everyone for attending my presentation this Saturday at the NYC (Winter) Code Camp! I really enjoyed the high level of interest and participation from the attendees. Unfortunately, we only had 75 minutes to talk about Entity Framework and EF Code First but thankfully we have the internet!
Thanks to all [...]
Also posted in Presentations, User Groups | Tagged Code Camp, EF Code First, Entity Data Model, Entity Framework 4, LINQ, MVC 3, NuGet, SQL, testing, WCF Data Services 4 |
File compression is nothing new to .NET. However, in many solutions it requires the developer to establish a file folder which they will write the compressed file to and later read from.
This solution cannot work if you want to compress and use the file in memory without writing to disk. An example of this [...]