Living in Code

Ramblings from a code monkey

2008!!

Wow, it's been quite a while since I've posted.  It was just into 2008 back in January.  Wow how time flies!

 Well, 2008 has brought many new versions of the tools that I use on a daily basis for my job.  Visual Studio has a 2008 version out.  Microsoft SQL Server has their 2008 version out (well, RTM will be next month so they say).  Also the .NET Framework is cranking along with the 3.5 framework which they are almost out with a final release of SP1.

I am excited that my job and the project I'm currently working on has given me the ability to upgrade to the latest versions of these tools.  So far I've been the most excited with SQL Server 2008 and all of the new features it has to offer.  Intellisense for T-SQL, now that's nice!

I'm also anxiously awaiting Apple's rumored update of their MacBook Pro laptop line.  Once they come out I'm going to get one and beef it up for my .NET Development.  I know many .NET developers out there would never think of owning a Mac, but man... once you go Mac you never go back!  My desktop at work is a HP workstation with Windows XP and I can't even tell you how many times I need to reboot to keep things running smoothly.  It's sad that as a Windows user I just am in the habbit now of rebooting when I leave for the day or when I go out to lunch.  With the Mac, I'm like "gee, I haven't rebooted in a few weeks, I should probably just do it for the hell of it."

Family life has been keeping me busy too.  We welcomed our 3rd child this past March and have been knee deep in kids!  Our twins turned 2 in June and they're getting smarter and smarter with each day that passes.  It scares me that they'll no doubt have me/us tied up in a closet at some point as they take over the house.

I am going to make an effort to post more moving forward.  God knows I come across enough technical things that would probably be helpful to others.  I'm learning to work with LINQ (also, here, scroll down to LINQ section) and can't wait to get more into that.  Also, SubSonic, a great tool, is out with a new version.  I'll be playing with that too when building an application I'm working on for my side-business.

Stay tuned!

Be the first to rate this post

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

Categories: .NET | LINQ | Mac
Posted by Don on Wednesday, July 16, 2008
Permalink | Comments (0) | Post RSSRSS comment feed

Testing email when working with no SMTP server

Happy New Year!

While this tip isn't my own, it still seems as though it will be very helpful.  I know that I do a lot of development locally where I don't have an SMTP server setup.  This tip, courtsey of .NET Tip of the Day, really will eliminate that problem and allow you to work with email without the headaches.

--- 

Testing code that sends email has always been a pain. You had to set up a SMTP service just to test that your .NET application sends the e-mail correctly.

However, there is a way to send e-mails with no SMTP server set up. Just configure your .NET application to drop e-mails into a specified folder instead of sending them via SMTP server:

<system.net>

   <mailSettings>

      <smtp deliveryMethod="SpecifiedPickupDirectory">

         <specifiedPickupDirectory pickupDirectoryLocation="c:\Test\" />

      </smtp>

   </mailSettings>

</system.net>

This will instruct SmtpClient class to generate mail message, save it as .eml file and drop it into c:\Test\ folder.

 

Be the first to rate this post

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

Tags: , ,
Categories: .NET
Posted by Don on Wednesday, January 09, 2008
Permalink | Comments (0) | Post RSSRSS comment feed

VB.NET RC4 Encryption for database storage

I recently had to upgrade some Classic ASP code to .NET for some data encryption.  The routines use RC4 encryption and make the result database friendly.  The following class can easily be dropped into your project for use with little effort.  The sample code shows the encryption and decryption methods.  You just provide the message and the key for either instance.  From there you can drop it in your database or do whatever you want!

Sample Usage:

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

        Dim plainText As String = "I'm exposed!"
        Dim passkey As String = "keep me safe"

        Dim safeText As String
        safeText = Common.Encryption.Encrypt(plainText, passkey)

        Response.Write(safeText)

        Dim decrypted As String
        decrypted = Common.Encryption.Decrypt(safeText, passkey)

        Response.Write(decrypted)

    End Sub

 You can view the entire class here.  If you're looking for some quick and easy encryption this will do the trick.

Currently rated 4.5 by 2 people

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

Posted by Don on Wednesday, November 28, 2007
Permalink | Comments (2) | Post RSSRSS comment feed

Learn how to write better code for free!

Use FxCop to write better code.  I've been using it for a little while now and it definitely has helped me out.

This article tells you how and why! 

Be the first to rate this post

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

Tags:
Categories: .NET
Posted by Don on Wednesday, September 12, 2007
Permalink | Comments (0) | Post RSSRSS comment feed

How to enable IntelliSense in .skin files in Visual Studio 2005

A co-worker of mine shared this with me recently.  It was one of the biggest annoyances in Visual Studio 2005 if you ask me!

How to enable IntelliSense in .skin files

IntelliSence everywhere! That's one of the biggest features in new Visual Studio .NET 2005 (VS 2005). But guess what, it doesn't work out of the box in .skin file  - the place you really need it. Those of you who worked with ASP.NET 2.0 themes understand me . Good news - there is a workaround to enable this feature. Do the following:

1. Go to Tools->Options menu.

2. Pick Text Editor -> File Extesion fom a tree at the left part of Options dialog.

3. Type skin in Extesion text box.

4. Select User Control Editor from Editor dropdown.

5. Click Add and then Ok to close dialog and re-open your skin files.

6. Say something corny about Microsoft.

Enjoy!

Be the first to rate this post

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

Categories: .NET
Posted by Don on Tuesday, August 28, 2007
Permalink | Comments (0) | Post RSSRSS comment feed