AppDev: Something You Should Know by Irena Kennedy

Everything that is related to application development, and other cool stuff...

Browse by Tags

Tagged Content List
  • Blog Post: SYSK 389: How to set ClientCredentials via Configuration file in Client

    I’m working on a project where a service hosted elsewhere requires Windows authentication. As a consultant, my computer is not on the customer’s domain, so, using my logged-on Windows credentials won’t do any good. And, doing nothing results in the following exception : “The caller...
  • Blog Post: SYSK 387: Resolving Data Type Conversion Error

    Consider the following line of code: AttendeeAvailability attendeeAvailability; . . . if (attendeeAvailability.WorkingHours.DaysOfTheWeek.Contains(DateTime.Today.DayOfWeek) == false) { . . . } You’ll get a compile time error -- Argument 1: cannot convert from 'System.DayOfWeek' to 'Microsoft...
  • Blog Post: SYSK 386: Performance Implications of Using One vs. Several Nested Hashtables

    Let’s say you need to quickly find some reference/lookup data and you decide to use hashtables… If your key is comprised of several elements, is it better, from the performance point of view for you to combine all of them into one string and use it to access a flat single hashtable, or,...
  • Blog Post: 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...
  • Blog Post: 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 ...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: 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...
  • Blog Post: SYSK 372: TFS – Enforcing Comments on Check-In & Violations Query

    As many web sites point out, TFS uses policies to implement a requirement that developers provide comments when checking in code. The policy must be deployed to each developer (client machines). The Team Foundation Server Power Tools include the Changeset Comments Policy , which allows you to verify...
  • Blog Post: SQL Server Connection Leak Simulation Tool

    Sometimes it’s necessary to test application performance in low available resource situations… I’ve seen tools that simulate low available memory, do network throttling, etc., but I have not come across one that simulates a lot of SQL Server connections being in use… Attached is such a tool. I...
  • Blog Post: SYSK 365: How to get your unit tests (test project in Visual Studio 2008, a.k.a. MSTest) run multithreaded

    If you want to test code that requires an MTA threading model (e.g. the code being tested uses WaitHandle.WaitAll), you need to change the .testrunconfig file manually and change the threading model from STA to MTA. There are other posts that say for VS 2005, you add the following line to the config...
  • Blog Post: SYSK 363: ‘Software is not made of bricks’ by Ragan Wald

    I recently came across this gem http://weblog.raganwald.com/2007/08/bricks.html -- strongly recommended! Here are the section titles to whet your appetite: · Software is not made of bricks · Assumption: it’s all about moving bricks · Software is more complicated than bricks · Determine...
  • Blog Post: SYSK 362: The cost of try/catch

    Since I’m still coming across a lot of conflicting recommendations on the “best practices for structure exception handling” (including those coming from different folks from Microsoft), I decided to write a blog post on the topic. So, what are the benefits and costs with SEH? Let me first...
  • Blog Post: SYSK 361: On the importance of signing assemblies from the versioning perspective

    There are many reasons for signing your assemblies (security being at the top of my list), but in this post I’d like to address the importance of using a key to sign your assemblies from the versioning point of view. Now, let’s assume for the sake of this discussion, that we’re talking about private...
  • Blog Post: SYSK 359: How to Purge Workflow Tracking Data Inserted By SqlTrackingService

    To my great surprise, after doing a search for a script that would delete the events logged by the almighty SqlTrackingService service, I didn’t find one… So, I quickly created it (see below), and it seems to do the job just fine given the current table schema implementation used by the service: IF...
  • Blog Post: SYSK 358: Run Rules Automatically When an Event Is Triggered

    Imagine this: you’re writing a custom user control and you’d like to execute a WWF ruleset when a certain event happens, e.g. a data context changes. Of course, you could create a delegate for the event and write a few lines of code to validate and execute a desired rule… But what if you had to do it...
  • Blog Post: SYSK 356: How To Execute A Workflow Synchronously Without waitHandle.WaitOne()

    Consider the following code snippet frequently found in sample applications, code snippets and published articles: using ( WorkflowRuntime wr = new WorkflowRuntime ( "WorkflowRuntimeConfig" )) { wr.StartRuntime(); using (System.Threading. AutoResetEvent waitHandle = new System.Threading...
  • Blog Post: SYSK 355: Design and Coding Guidelines for Better User Interfaces

    If you’re developing the front end, the user tier of applications, you may be interested in the following 81 rules for better user interfaces published by SSW -- http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterInterfaces.aspx . Special thanks to Ashraf Khader for bringing this to my attention...
  • Blog Post: SYSK 353: What’s New in "Orcas" (next version of Visual Studio)

    This is first in the series of small posts about new features in Orcas… 1. Orcas can be installed and will run side-by-side with Visual Studio 2005 (even with the beta 1 release currently available) 2. You can use Orcas to create projects (i.e. target) using different versions of .NET framework...
  • Blog Post: SYSK 352: Windows Workflow Foundation Runtime Footprint

    After seeing presentations that assert that “Workflow runtime is lightweight” and not finding any concrete numbers to support that claim I decided to do some of my own profiling. Here is what I’ve done, measuring memory utilization after every step (the displayed results are the difference, in...
  • Blog Post: SYSK 351: "Agile Development: Fact or Fiction" by Matthew Hotle

    While this article is not new (was published in October 2006), and you can purchase it from http://www.gartner.com/DisplayDocument?id=497386&ref=g_sitelink , I thought it might be of value to quote (and paraphrase) a few key points: 1. “In most successful agile efforts, business staff … constitute...
  • Blog Post: SYSK 348: InvokeRequired No More…

    By now, we all have learned to call Control.InvokeRequired to avoid the following error when updating UI from another thread or calling other apartment threaded objects that expect to be called on a thread they were created on: The calling thread cannot access this object because a different thread...
  • Blog Post: SYSK 346: How WPF Commands Make Programmer’s Life Easier

    Yesterday, I came across the following example demonstrating the power of WPF commands written by Adam Nathan and published in his book “Windows Presentation Foundation Unleashed” (I’ve made some small formatting changes): < Window x:Class = " WPFWinApp.Window1 " xmlns = " http://schemas...
  • Blog Post: SYSK 344: Learning WPF – What Are All These PreviewX Events?

    Did you notices that there are a lot of events that start with word ‘Preview’, and all of them seem to have a “buddy” event with same name but without the ‘Preview’ prefix? For example, the following paired events are defined by the System.Windows.Window class: PreviewDragEnter & DragEnter...
  • Blog Post: SYSK 342: Learning WPF – Logical and Visual Element Tree

    Whether you’re dealing with routed events or trying to figure out why your styling is not working quite as expected, you’ll need to understand these two new concepts in WPF… So, here it goes… Consider the following XAML: < Window x:Class = " WPFWinApp.Window1 " xmlns = " http://schemas...
Page 1 of 7 (162 items) 12345»