Monday, April 16, 2007

Phew! What a crazy, fun weekend!  I'm finally getting caught up.

This past weekend (April 14th, 2007) we had the opportunity to host and participate in the second Code Camp in Utah officially entitled “Utah Spring Code Camp 2007”.  Our goal is to put these on every six months, the next one sometime between Sept and Nov of this year.

Nonetheless, this event was a lot of fun.  There were many in attendance, though not quite as many as we were hoping for.

I had the opportunity speak on .NET Serialization.  It was a variation on a presentation that I had prepared a few months back for the Utah .NET User Group and this time, after rewriting the presentation and code samples from scratch it went MUCH better.  I am quite happy with how it came out (I hope those in attendance gleaned some nuggets of information).

As it turns out one presenter was not able to make it out to the Code Camp (calling in around 10:30 or 11:00 in the morning) so we had to scramble a bit.  I had some ideas up my sleeve based on what I had trimmed from my presentation and we focused the second hour on XML Serialization.  That was a lot of fun! :-)

The third block was a shortened (30 min) presentation in which I discussed an evolution in accessing application configuration files (e.g., web.config, app.exe.config, et al).  Beginning with the most basic access method via AppSettings, we progressively made the transition to ConfigurationSectionHandlers and XML Serialization.  We used this technique to deserialize a block of XML from the configuration file into an object in code that we can access.

All in all, I'm quite happy with the Code Camp, though I wish I could have attended more of the presentations.  I guess that's a drawback from having multiple tracks running simultaneously - you have to pick and choose what you're gonna see.

The code for my presentations can be downloaded here.  Enjoy!

Monday, April 16, 2007 4:00:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Tuesday, April 10, 2007

Today, April 10th, 2007, marks the three year anniversary of my blog.  What an amazing three years!  This marks the 504th post on this here blog.

Looking back over the past year I'm pretty happy with the many things that have been accomplished and the progress that I've made, both as a developer but also as a person in general.  Among other things, I've strived (more of late than usual) to not focus solely on computers, as it were, and more on life in general.  You could say I've ramped up other aspects of my life because I recognize that there's more to life than just sitting behind this monitor and keyboard.

For instance, I've taken up construction and woodworking (long time loves of mine to which I've not dedicated as much time as I would have liked before).  As soon as I clean out my garage I can really go to town. :-)

Also, looking back on my blog, I've made some changes periodically and sporadically.  I've recently added Google Ads and a Google Search.  I hope those aren't visual obtrusive and annoying.  It's been interesting to see how many ad clicks are made and how many searches are performed daily on the blog.

You may have also noticed my download and rating controls.  I get notified each time someone downloads a file and/or rates a blog post or comment.  That's been a lot of fun to see at least one download a day by someone (most of the time I don't know who they are).  I've received but a very small handful of emails regarding issues with the downloads.  Have they been working for everyone?  I would assume so.  I've found it quite interesting to see that the Image Rotator Control is, by far, the most popular download.  I would not have expected that.

Well, enough rambling.

Here's to another fruitful, fun-filled year!  Enjoy!

 

Tuesday, April 10, 2007 6:57:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Monday, April 09, 2007

There's gonna be a fun MSDN event this coming Thursday, April 12th (same day as our Utah .NET User Group meeting - reminders going out shortly) from 1:00 PM - 5:00 PM at Jordan Landing in West Jordan on ASP.NET AJAX and CardSpace.  I'll be there - it should be a great time.

Here's the event link with all the details:  http://msevents.microsoft.com/cui/EventDetail.aspx?culture=en-US&EventID=1032326499

Monday, April 09, 2007 7:07:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback

This past Easter weekend I had my first chance to dabble in an MMORPG (Massively-Multiplayer Online Role-Playing Game) called 'The Lord of the Rings Online - Shadows of Angmar”.  I've long resisted playing these games (though I flirted with the Star Wars Galaxies game for about 2 hrs) for a multitude of reasons, not the least of which is the potential time-sink it would become.

I was initially turned on to the game by a good friend, Eric Tolman, and the screenshots that he took while in-game.  I thought I'd bite the bullet and install it and give it a trial run during a free, open beta they're calling 'World Tour'.  I can honestly say - WOW (and no, not World of Warcraft).  The game is pretty amazing.  I played for a few hours, completing quests, gaining levels, interacting with other players, formed a fellowship, and helped save the town.  It was a lot of fun.  Like I say, though, I don't have much to compare it to since I've never really played the other games like it.

Though I'm not sure I'll ultimately subscribe to the service (when do I really have time to play games?), I can honestly say I'd have fun if I did.  I still have another 14-odd days left in the World Tour beta before the game goes live, and I intend to enjoy them.

Monday, April 09, 2007 3:51:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Thursday, April 05, 2007

As a reminder to everyone, we've having our second Utah Code Camp this next Saturday (April 14th, 2007) at Neumont University.  The last event was a great success and a ton of fun.  Please set aside the date and register.  Here's the official blurb:

What: Utah Spring Code Camp
When:  April 14th 2007 9:00 AM - 5:00 PM
Where: Neumont University
Registration:
http://utahcodecamp.eventbrite.com

The local .NET Users Group and SQL Server Users Group is conducting a “Code Camp” for local software programmers next month at Neumont University.  The code camp is by the community for the community.  Always free and Always for the community.

The Saturday, April 14th event is scheduled from 9:00 AM to 5:00 PM. The conference is free please register at. http://utahcodecamp.eventbrite.com
Lots of Sponsors and Lots of software and Tech Gadgets to giveaway!
You can check out
www.msutahevents.com  for a session schedule and speaker list for the Code Camp.

Thursday, April 05, 2007 6:12:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, April 03, 2007

It was requested to keep this information confidential until 9:00 AM PDT today, but the hour has past. :)

I recently received word that Microsoft has retracted its initial plan of not including the Expression suite of tools (e.g. Expression Web, Expression Blend, etc) with MSDN.  After the barrage of concerned voices and complaints against this decision, Microsoft has decided to make Web and Blend available to all MSDN Premium subscribers (Web is available now to MSDN downloads).

For further reading see Somasegar's WebLog.

Tuesday, April 03, 2007 3:34:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, April 02, 2007

For the past several days I've been hampered by the fact that the keyboard shortcut SHIFT+TAB wasn't working in IE.  This was driving me nuts!

I found that disabling the Windows Live Toolbar brought back the functionality (the only add-in besides Fiddler that I had installed).  Well, that was disconcerting as I enjoy having that toolbar present.  When I brought the toolbar back SHIFT+TAB would continue to work...that is, until I reopened the browser, then the problem was back.  I suspected it wasn't the 'toolbar' per se, or this would have been a more well known issue.  After a bit of deduction, I figured out that the Highlight Viewer button was the problem.  I removed the button (and restarted the browser for good measure) and my suspiscions were confirmed.

Is anyone else experiencing this issue?

Monday, April 02, 2007 7:23:00 AM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Saturday, March 31, 2007

I realize that this is quite elementary and simple, however, it constantly eludes me.  Therefore, I'm documenting it here more for my benefit than anyone else's; though if it helps anyone out there - that's wonderful! :-)

I ofttimes find myself wanting to 'pin' an HTML element on the page.  This can be accomplished quite easily via the CSS position attribute with a value of absolute or fixed and a specified location.  More often than not, positions are specified in coordinated with the top and left attributes to designate the upper left corner of the element.  I find, however, that I frequently want to pin something on the right edge of the browser and/or the bottom.  When the user resizes his browser the element should move with the new dimensions.  For some reason, I always want to make this harder than it really is.

It's a simple problem really, if you can mentally depart from considering element position by the upper-left corner.  For instance, if you want to pin an element in the upper-right corner of the browser, simply specify the top and right properties.  It's that easy!

The CSS style:

#copyright { position:absolute; top:0; right:0; margin:10px }

The HTML:

<div id=”copyright”>
   Copyright &copy; 2007, Devstone Software<br />All rights reserved
</div>

Moving it to the bottom-right corner of the page is simple:  specify the bottom and right properties:

#copyright { position:absolute; bottom:0; right:0; margin:10px }

Along the same lines as this simple, yet somehow elusive mechanism, I frequently find that I want to define a DIV to fill the page.  You may be tempted to use the CSS attributes width and height with values of 100%.  This however is not the correct choice.  If you've tried it in the past you've probably become frustrated and perhaps even resorted to using a TABLE element to establish your page layout as a last recourse.

All is not lost.  You can simply use the same principles as above to define your DIV and fill the page.

The CSS style:

body
{ background-image:url(pattern.gif) }

#page
{ position:absolute; top:0; left:0; right:0; bottom:0; margin:5px; border:solid 2px black; background-color:white }

The HTML:

<body>
   <div id=“page“>Page content here</div>
</body>

Elementary, my dear Watson.  Now maybe by having jotted this down I'll remember it in the future.

Saturday, March 31, 2007 5:21:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Friday, March 30, 2007

Having recently moved my primary development environment over to Windows Vista I've been presented with a small learning curve when developing my ASP.NET applications. It's been good, however, as I've been forced to delve into IIS 7.0 and explore some of its capabilities and learn some of its nuances. To be sure, I'm very much enjoying working with it…but there's a lot to learn and become acquainted with.

I have a web application that I'd been working on in an IIS 5.5 (Windows XP) environment successfully prior to the migration so I thought I'd set it up and take it for a test drive in the IIS environment. I was pleased that I had but a few changes to make to make it operational. Getting it run from Visual Studio 2005 was a different story however.

I found that anytime I attempted to run my website by pressing F5 within Visual Studio I was presented with a dialog explaining that it was "Unable to start debugging on the web server. An authentication error occurred while communicating with the web server. Please see Help for assistance." I could, however, attach to the running process (w3wp.exe) and debug that way. In my case, while that would have worked most of the time, it didn't provide me access to some of the methods that I'd want to debug (like BeginRequest) and is a bit more cumbersome. Well, this was a bit disconcerting, but after a few minutes of tinkering in IIS to attempt to resolve it I resorted to running a quick Google search. It turns out I wasn't alone on this issue, not by a long shot. The first blog post I found was by Rajiv Popat and it was quite helpful, but not quite what I was looking for. In his post he recommends using the Classic Mode rather than the new Integrated Mode. NOTE: The Classic Mode that is provided with IIS 7.0 provides a runtime environment that mimics IIS 6.0. I could have used that happily, but as I'm not generally satisfied with workarounds or just settling for the first solution, er, band-aid that I find, I wanted to dig deeper and get my application working in the newer environment.

This is when I found a great blog post by Mike Volodarsky (a Program Manager on the IIS team). In his post he mentioned the key characteristic as to why I couldn't debug my site via F5: I had a global.asax file (though I deleted it – it wasn't necessary in my app) and a custom HttpModule that attaches to the HttpApplication.BeginRequest method. Apparently "there is a bug in ASP.NET Integrated mode that prevents authentication from taking place correctly for the debug auto-attach feature". Well, removing the custom HttpModule was not an option because it does some pretty slick URL rewriting for the site and is critical for its operation. That, combined with the fact that Classic Mode didn't really give me the warm fuzzies, led me to adopt his Debugging Assistant (64-bit Version). Man, what a life saver! This worked – though it didn't work at first for me when I tried it yesterday, but I hunkered down and resolved to figure out why tonight.

When running in IIS 7.0's Integrated Mode, the web server will not rely on settings within your section of the web.config file as it does in Classic Mode. Rather it relies on the new section. As per the instructions on Mike's site, I added the special debug module and handler to the appropriate sections in the web.config file, but I continued to receive the "An authentication error occurred communicating with the web server" error. It turns out that I was clearing the modules and not adding back in a module that is required for debugging: WindowsAuthenticationModule. Hey, I'm still learning IIS 7.0 here J This is approximately how my web.config appears:

<system.webServer>
   <modules>
      <clear />
      <add name="debugassistant" />
      <add name="WindowsAuthenticationModule" />
   </modules>
   <handlers>
      <add name="DebugHandler" path="DebugAttach.aspx" verb="DEBUG" type="System.Web.HttpDebugHandler" />
   </handlers>
</system.webServer>

It turns out the fix was quite easy once I knew what I was doing.

Friday, March 30, 2007 7:44:00 PM (Mountain Standard Time, UTC-07:00)  #    Disclaimer  |  Comments [7]  |  Trackback