Encrypt sections of Web.Config or App.Config

March 3, 2008 18:03 by garrymc

In many application be they web or otherwise it can be important to secure parts of the configuration files incase the file is compromised by a hacker or you simply don't want anyone to know what the true values are. It turns out that this is fairly easy to do using the ASP.NET IIS Registration Tool (Aspnet_regiis.exe) (obvious right?). To illustrate the point I'll show you a typical config file and what's required to encrypt parts of it. More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
kick it on DotNetKicks.com

Currently rated 3.2 by 55 people

  • Currently 3.199999/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Programming Microsoft Message Queues (MSMQ) in .NET Book Chapters

October 9, 2007 19:11 by garrymc

Here is Chapters 4 & 5 of the book I never got around to publishing. The chapters cover MSMQ in a fair amount of depth, but remember whole books have been written on this subject. So don’t expect it to be some type of bible. Having said that, if you don’t need to be a guru then these Chapters will give you more than enough knowledge to start working with MSMQ and also explain why it’s a good fit for a particular situation. I’ve included the table of contents so you’ll have an idea of what’s being covered. If you have any feedback feel free to leave a comment! More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
kick it on DotNetKicks.com

Currently rated 3.2 by 23 people

  • Currently 3.217391/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

The .NET 2.0 KeyedCollection maybe your most valuable!

September 27, 2007 19:08 by garrymc

When I work with collections I’ll often want to retrieve information from the collection by its key. So my options are usually to make use the following generic collection (who uses any other type of collection now? Unless you’re stuck on .NET 1.1):

   1: System.Collections.Generic.Dictionary<TKey,TValue>

This is great collection except if you want to ever serialize it! Then you’ll have some problems. So the issue becomes do I want a collection which is searchable via an index and is serializable or one that is keyed but can’t be serialized. The problem however, is that in a lot of cases you actually want to be able to use both methods, that is search by ordinal number or index and be able to search by a key, which maybe a business key. To solve this issue many have resorted to inheriting from IList<T> then adding another item overload which iterates through the collection until you find a match. This works, but is probably not too efficient on large collections. Also it’s a pain to have to write this code each time.

With the introduction of .NET 2.0 Microsoft released a collection object which doesn’t get a lot of press. The reason why it’s not discussed very often is because it’s only provided in an abstract form. That is you have to create a concrete implementation before you can use it. As it turns out this is not that hard to do. For example the following C# code is an example of a simple implementation for an Order class: More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
kick it on DotNetKicks.com

Currently rated 3.1 by 8 people

  • Currently 3.125/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Programming Windows Management Instrumentation (WMI) .NET Sample Chapter Part II

September 17, 2007 19:10 by garrymc

Here is the next Chapter of the book which is the second part of the WMI Chapter. This Chapter explains how to manipulate class instances and asynchronous processing. Also covered is how you can add WMI support to your own applications which is surprisingly easy but can be quite useful, including exposing application data and how to raise events from your application.

Next week I’ll release the Chapters on Microsoft Message Queues. Feel free to leave any feedback about what you thought about the Chapter. I’ll also be blogging about some things I’ve been working on more recently over the next week or so too.

To give you an idea of the chapters contents here's the table of contents. More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
kick it on DotNetKicks.com

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Programming Windows Management Instrumentation (WMI) .NET Sample Chapter Part I

September 10, 2007 21:36 by garrymc

Here is the first chapter that I'll be publishing. Its about WMI (Windows Management Instrumentation), which is a subject that is not particularly well known. Some call it Microsofts best kept secret, because with WMI you can get access to information that would typically be difficult or impossible to get otherwise. WMI is such an important technology (for certain applications) that all the chapters I'll be presenting have a WMI section which explain how to exploit WMI for that area. Now, its important to have a good understanding of this technology before you can work out how to apply it in numerious ways. This is the first of two chapters which deal with WMI specifically and will give you a very good understanding of the technology.

Feel free to leave comments, with the disclaimer in mind :)

Disclaimer: The book chapter presented is still in a draft state and as such is provided as is without any implied or otherwise warranty for purpose or accuracy. More...

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList
kick it on DotNetKicks.com

Currently rated 2.8 by 13 people

  • Currently 2.846154/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5