Archives / 2004 / March
  • VS.NET 2005 CTP & ASP.NET - Round 2

    I started digging into ASP.NET 2.0 some more today, playing with the new security controls & data binding. I've very impressed in how both of these work, with the ability to "open" things up by providing your own providers & databinding against custom business objects.

  • Reporting Bugs in VS.NET 2005 CTP

    As I'm starting to use VS.NET 2005 CTP more and more, I'm coming across some bugs...duh!  Well, I was hunting around the IDE to see if there was a "Submit a Bug" menu item, or a shortcut to a website...however I could not find anything.

  • VS.NET 2005 & ASP.NET Projects

    Well I started to get into using ASP.NET in VS.NET 2005 CTP this morning, and I definately have to say, its much further along than the windows forms.  So far I'm really impressed with it, and I would like to share some of my experiences & impressions:

  • Scott Guthrie on Data with ASP.NET in VS.NET 2005

    I just finished watching Scott Guthrie's episode on MSDN TV on "Data with ASP.NET in Visual Studio 2005", and I definately have to say that this is one of the better demonstrations of databinding I've seen for Whidbey.  During the first half of the demo, it was the "quick-n-dirty" way of creating data-bound pages, which in corporate environments, have no play for "reality".  This half went back to my earlier rants (which I can't find :( ) about why some properties are set the way they are...and that is to provide the quickest & dirtiest way of providing a working demo for non-technical users in the least amount of time.

  • New Utility: Resizer

    How often do you need to resize & compress images after taking a TON of pictures on your digital camera?  I've come across this issue many times, and resizing & compressing 50+ images at a time is always a pain.  Now, with Resizer (current version 0.2), this pain is illeviated by allowing you to load a directory of images, select which ones to resize, choose a size, then sit back...wait...and view the resized images.  The wizard based approach allows any non-technical user to resize images with ease.

  • XP SP2 RC1 - Dead, after 3 days

    Well, it took 3 days to officially kill my computer after installing Windows XP SP2 RC1.  Well, it didn't necessarily kill it, but it would freeze during the bootup.  That was only the peak of things this evening, however earlier this afternoon everything just shut blue screen of death, nothing.

  • BlogJet BETA Released

    BlogJet Beta Release Notes
    March 25, 2004

    * Multiple categories support.
    * Quick test of FTP settings.
    * pMachine support.
    * "Delete Draft files after posting" option in settings.
    * New keyboard shortcuts:
       - Ctrl+Tab - switch between Normal/Code view.
       - Ctrl+M - indent
       - Ctrl+Alt+M - outdent
       - Ctrl+Shift+N - numbering
       - Ctrl+Shift+L - bullet style
       - Ctrl+Shift+I - insert image
       - Ctrl+Shift+V - attach voice
       - Alt+D - select text in Title bar
       - F5 - change account

    * BlogJet This! did not work with long selection.
    * Draft files handling errors.
    * Login window when opening draft.
    * Installer issue on "Launch BlogJet".
    * Printing from code editor did not work.
    * Fixed various issues with b2-based blogs.
    * Ctrl+A, Ctrl+K in code editor did not work.
    * Fixed issue with blog URL for Blogware.
    * Code tab wouldn't appear with large fonts.
    * "Access violation at address 005489A4" fixed.
    * Some main window shortcuts worked in Login dialog.
    * Sometimes "t" didn't work in editor - fixed.

  • VS.NET 2005 CTP - First Impressions

    Well, I just finished installing VS.NET 2005 CTP, and first I have to say - great job on the installation VS.NET Team!  This was the shortest install I've ever seen for VS.NET.  It didn't eve look like the thing was installing, I thought I was still installing Pre-Reqs...but no - its done.  Here were some of my first impressions/insights/notable items:

  • Downloaded VS.NET 2005 CTP - Now What

    Okay, so you just finished downloading the massive 2.67 GB .IMG file from MSDN, and go figure, you don't have a DVD burner available.  Time's crunching away until Apprentice starts, you haven't eaten, and all you want to do is get VS.NET 2005 CTP installed on that freshly installed VPC image.

  • VS.NET 2005 available on MSDN

    Yeah, thats right...its ready for you to download.  I'm downloading it at work and at home, both are going to take about 4 hours since its a 2.6GB file.  So, if your a MSDN subscriber, hop online and grab it!

  • Plugin Release: NewsGator NNTP Plugin v1.0.1

    Version 1.0.1 of the NewsGator NNTP Plugin to allow posting to newsgroups has been released.  This version fixes a major bug in the extension when receiving posts in NewsGator.  The previous versions would incorrectly associate bad data to the post, which resulted in incorrect threading of posts.  If you're running the NNTP Plugin, this update is a MUST!

  • Securing Connection Strings

    On Monday, my team at work got together and a pow-wow about security and how we can be more pro-active in developing applications.  As we went through sessions 2 & 3 from DevDays, we had a lengthly discussion on how we should proceed in securing the connection strings.  As most of you know, the OpenHack, and "best" method for securing connection strings, is by using DPAPI to encrypt it, and then store that encrypted string in a ACL'd registry key.

  • Dogfooding my NNTP Plugin

    Yesterday & Today I decided to start being more proactive in newsgroups, and as such I wanted to start dogfooding my NNTP NG Posting Plugin. I definately have to say that reading & responding to newsgroup postings is extremely easy.  Since I really never posted to newsgroups, I never really used it, I just developed it because there was a need in the community for it.  However, after using it several times, I'm definately stoked about it...and I would have to say that dogfooding is always a good idea on whatever application you're using. Maybe I'll find something I like or don't like about it that I can change.  Gotta love it.

  • Installing XP SP2 RC1

    Well I thought long and hard all day about installing XP SP2 RC1 on my laptop that I use for work and home.  I think I'm going to take the plunge since I've seen some pretty positive comments about RC1 being pretty stable.  So, lets just hope tomorrow I won't be rebuilding my laptop, and rather be working more securely & testing out SP2.  If I find anything quirky, I'll definately post it.  Wish me luck :)

  • Snow?

    EEEK! So I wake up this morning, go to my office, sit down in my chair... then I glance to my left - ITS WHITE OUT!  AHHH! Why does it have to snow in the middle March?  Well, I guess thats okay, because its supposed to be in the 60's by the end of the week.

  • Thinking Toys

    A coworker of mine was just complaining how the cleaning crew had thrown away his bent-up paperclip that he played with while thinking this last weekend.  This made me start to wonder what I play with when thinking about a problem while programming.  It turns out that I actually have 2 different items. 

  • "The http redirect request failed."

    Ever got this message attempting to open a solution in VS.NET 2003? Well, the full error message is "The web server reported the following error when attempting to open or create the project at the following URL: The http redirect request failed." A co-worker ran across this multiple times on Friday, and got entirely fed up with the problem that he'd have to refresh the entire project from VSS or delete the /bin directory each time. I guess the root cause of this is something with the page named: "get_aspx_ver.aspx". After a call to MS, he came back with a solution:

    protected void Application_BeginRequest(object sender, EventArgs e)
      string ver = Request.ServerVariables["URL"].ToString();

      if(ver.IndexOf("get_aspx_ver.aspx") >= 0)

    After the previous code was added to the global.asax file, our solutions started opening without any problem.

  • Encode HTML - Have validateRequest = True

    A co-worker and I had a situation today in which we wanted a particular TextBox control to allow HTML. The only problem, is that validateRequest must be done across the entire website, or for the particular page. Because of these restrictions, and the fact that the UserControl being built is placed in a dynamic page for a portal, we had to research ways to allow HTML posted entries but still keep validateRequest=True.

    After doing a little bit of research, I came across the idea of replacing the character representation of common HTML elements via Javascript then decoding that information with Server.HtmlDecode.

    The code is as follows:

    <%@ Page language="c#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false" Inherits="Test.WebForm1"
          <form runat="server">
             <script language="javascript">
                function encodeMyHtml(toEncode) {
                   return toEncode.replace(/&/gi, '&amp;').replace(/\"/gi, '&quot;').replace(/</gi, '&lt;').replace(/>/gi, '&gt;');


             <asp:TextBox Runat="server" ID="tbEncodedText" TextMode="MultiLine" Columns="100" Rows="10" >
             <asp:Button Runat="server" ID="btnSubmit" Text="Submit My HTML" OnClick="btnSubmit_Click"/>
             <asp:Literal Runat="server" ID="outputHTML" />
    Then in my code-behind I have this in my Page_Load function to add the onclick attribute:
    private void Page_Load(object sender, System.EventArgs e)
          btnSubmit.Attributes.Add("onclick", "this.form." + tbEncodedText.ClientID + ".value = encodeMyHtml(this.form." + tbEncodedText.ClientID + ".value);");

    Then my button event, I have:
    private void btnSubmit_Click(object sender, EventArgs e)
       outputHTML.Text = Server.HtmlDecode(tbEncodedText.Text);
       tbEncodedText.Text = Server.HtmlDecode(tbEncodedText.Text);

    Overall, this provides a nice solution to not having your entire web application or page allow HTML elements.

  • Reading Eventlog Entries

    I was asked by my boss the other week, in my spare time at work, to create a script or windows service that would read all entries in the Application Event Log for that day. He pointed me to a link that used VBScript and some wacky dll named "winmgmnts". This seemed like a pain, and I was like...I know you can write to Event Logs with .NET, why couldn't you read them...sure enough, you can. The following code is used to read all entries for the current day of 3 defined logs. This, obviously, can be expanded further...which is what I intend to do.

    using System;
    using System.Diagnostics;

    public class MyClass
      public static void Main()
        int month = DateTime.Today.Month;
        int day = DateTime.Today.Day;
        int year = DateTime.Today.Year;

        string[] logNames = new string[] {"Application", "Security", "System"};

        foreach(string log in logNames)
          EventLog appLog = new EventLog(log);

          foreach(EventLogEntry entry in appLog.Entries)
            if(entry.TimeGenerated.Month == month && entry.TimeGenerated.Day == day && entry.TimeGenerated.Year == year)

  • Tab Key Emulation

    Today, in the project I'm currently working on, I had to figure out a way of emulating the tab key by pressing the Enter key. I had found a very complicated script that required you to know the next id/name of the textbox or control that would need focus next...and since I'm creating 4+ textboxes in a datagrid, plus the ability of dynamic columns (all containing textboxes), this just wasn't going to be an easy task. As I set out, Google pointed me to a very helpful thread post. All you had to do is capture the enter key code and return the tab key code...simple, and works excellent!

  • Links 2004 Players?

    Well I just purchased Links 2004 for the XBox yesterday, and the game is great.  I know about a month ago, there was a lot of hoopla about .NET community geeks, like myself, were getting together regularly to play a few rounds.  I unfortunately don't remember who you were, but if you want to add me to your friends list to catch me online playing sometime, my username is MHawley

  • .NET Framework 1.1 SP1

    I had downloaded XP SP2 Beta last night to install on my Virtual PC so I could try out Whidbey.  Well, after I tried running the installer for Vault, I realized I didn't have the 1.1 framework installed, so the installation couldn't continue.  I figured, why go re-download, when I know I have the .NET framework on the SP2 Beta CD.  To my suprise, it installed the 1.1 framework, as well as SP1 for the 1.1 framework.  Does anyone have any info pointing to the changelog for this SP?  I'm intrigued to find out what was fixed.

  • DevDays - Chicago, Wrapup

    DevDays was definately worth the wait.  I had a wonderful time learning about security in web applications as well as a brief intro into SmartClients. 

  • Off to DevDays

    Well its about 2:30, and I'm packing up my laptop (well not really because I'm using it to write this blog post) to head on out of Bloomington and travel up to Chicago for DevDays tomorrow.  Glad to see that a few of us have gotten in contact about a meetup to eat/drink afterwards tomorrow.  If your heading to DevDays, Chicago - stop on by Rock Bottom Brewery afterwards!  Jeff Key, Adam Kinney, Erik Porter and myself (along with my coworker) will be there having a good time.  I'll probably be able to check my email a few times tonight, so if you wanna meet up, drop me a line and I'll give you my cell phone number.

  • DevDays - Chicago

    I know Jeff and Adam threw out their plea (is it really a plea?) for attendees of the DevDays, Chicago event next Wednesday, but I really haven't heard back from either of them about a possible meetup before/during/after DevDays.  So, if you're going to DevDays, Chicago on March 10th, shoot me an email.  I'd like to meet anyone and everyone there!

  • Central Illinois Dot Net

    Last night hosted our first "real" meeting for the Central Illinois .NET User Group based out of Bloomington, IL.  I say "real", because every meeting prior to last night, were just brief get-to-know-you meetings, and discussions on what we'd like the group to do.

  • Why I Built WebDeploy

    I've received multiple comments on why I developed WebDeploy rather than just using XCopy or VS.NET's inherint "Copy" tool.  I just wanted to take a brief moment to share why WebDeploy was built:

  • Plugin Release: NewsGator NNTP Plugin v1.0

    Version 1.0 of the NewsGator NNTP Plugin to allow posting to newsgroups has been released. This version includes instant notification of updated versions, as well as refinement of the sending username and email per the RFC spec.  This version solves the 441 error, where you may receive a message saying your email address doesn't conform to internet standards.

  • System.IO Woes

    I've been working on a Web Deployer windows application the last week or so, and everything was working great until I refactored some code the other night.  In a separate thread, I'm traversing through a directory (and subdirectories) getting the size of all the files needing to be copied.  Just after that, I start traversing through that same directory, attempting to copy the file to a destination. However, after refactoring code into 1 method for all the traversing, I've been unable to copy any of the files, and am getting a "The process cannot access the file ... because it is being used by another process."

  • MSDN Connections

    As Frank stated, MSDN Connections (Australia) is up and running.  However, when I tried to register, it told me that I must change my country to Australia to get into it.  Well, since I don't live in Australia, I don't want to do that, so I guess for the masses, we'll have to wait until MSDN Connections is available for the US or other countries.