How do Determine if Your Application is Running in Cassini

This is really short post, more a tip. If you need to determine if your application is running in IIS or Developer Web Server (Cassini) that comes with Visual Studio, you can test the process name you are running in.  For example, the following code: System.Diagnostics.Process.GetCurrentProcess().MainModule.FileName will return the name of the running process.  In …

Continue reading ‘How do Determine if Your Application is Running in Cassini’ »

Encryption in Silverlight and .NET Applications

Today I would like to cover a specific use case that came up a few times in Silverlight applications I wrote.  For example, I wand a user to enter some sensitive information, encrypt it in Silverlight client, transfer it over to the server, then decrypt it and perforation some operations on that data. First step …

Continue reading ‘Encryption in Silverlight and .NET Applications’ »

First Stab at Reactive Framework

Today I made an attempt to make some sense of Reactive Framework(Rx).  Rx allows developers to write queries against events.  I know, I had hard time wrapping my head around this concept as well.  I hope the example below will help. I downloaded and installed Rx extensions for Silverlight from the page above.  I created …

Continue reading ‘First Stab at Reactive Framework’ »

Extending Interfaces with Implementation

Today I was faced with an issue.  I had an interface based implementation of a specific functionality.  All classes that implemented this interface had different implementation of course.  What I had to add is ability to run certain checks on each implementation that would need to analyze the data defined in the interface and return …

Continue reading ‘Extending Interfaces with Implementation’ »

AppFabric Caching (Velocity) and Versioning

To continue on the topic of Velocity, I will explore versioning today. As I showed previously, you can use DataCache.Add method to add an item to cache.  This, of course, requires that this item’s key was not to be found in the cache already, or an exception will be thrown.  This puts a damper on …

Continue reading ‘AppFabric Caching (Velocity) and Versioning’ »

Getting Started with Velocity (AppFabric Caching Library)

I have worked through my first Velocity project today, and I would like to blog about  the steps necessary to use caching. First, you should read my previous post and install AppFabric on your machine. I used Visual Studio 2010 beta 2 to create the solution.  You can download the solution here.  I create WPF …

Continue reading ‘Getting Started with Velocity (AppFabric Caching Library)’ »