CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Brendan Tompkins [MVP]

Blog First. Ask Questions Later.

March 2006 - Posts

  • The Port is Hiring

    My client, Virginia International Terminals is looking to fill a full-time, on site, salaried position for an ASP.NET/ SharePoint developer. The port is really a great place to work.  From what I understand, the benefits for full-time employees are outstanding, the work is plentiful and challenging, and you’d be working closely with a solid, seasoned .NET team Wink [;)]

    ASP.Net Web Developer

    Virginia International Terminals, Inc., a worldwide leader in the maritime industry, is seeking an individual to join a team of developers working on large ASP.NET applications for the Port of Virginia. Expertise with C#, ASP.NET, Microsoft SharePoint and SQL Server Required. Experience with Web Design, TDD, Design Patterns and digital imaging a plus. We offer excellent benefits including fully paid family health, dental, vision, disability, life, retirement, and deferred compensation with Company match. Interested individuals may submit a resume with salary requirements to Virginia International Terminals, Inc., P.O. Box 1387, Norfolk, VA 23501 or FAX to (757) 440-7194 or e-mail to resumes@vit.org.

  • Extracting files from installer EXEs and MSIs

    I had an interesting case today where I needed to strip all that ugly Office HTML out of an html document. I found this tool for Office 2000 that supposedly did just that – strip all that ugly “MSO” stuff from the file.  There was a problem though, this .exe installer wouldn’t open on my machine, because I don’t have Office 2000 installed, only Office 2003. 

    I found that this installer supposedly contains a utility called “MSFilter.exe” that will run as a stand alone .exe, and would batch convert html files, stripping the office XML.   Some sites mentioned that if you install this tool on a machine with Office 2000, you could just copy the MSFilter.exe file to the computer without office 2000, and use the utility. 

    I don’t have such a system, but I figured out a way to extract these files from an installer.  I’m not sure how often this will work, but the method I used here worked great to extract just the utility I needed from this installer.

    Here’s what I did after downloading the MsoHtmf.exe file from MS.

    Step 1: Extract CAB files from the .EXE installer file

    I opened the .exe file in Visual Studio and peeked at the files resources.  I noticed a binary node called “CABINET.” Right-Clicking on this node allowed me to export the contents to disk as a “BIN” file.  I changed the extension to  to “.CAB” and was able to open the file with WinZip

    .

    When I did this, I was left with two files inside of this CAB file, “Luncher2.exe” and “msohtmf2.msi”.  Running this .MSI file gives the same “Cannot Install” error as before, since I didn’t have Office 2000 installed.  I was sortof back at square 1. I needed to open an MSI file and extract the contents. 

    Step 2: Extract the CAB contents from the MSI file.

    It turns out that there’s a little utility deep inside the Windows Installer SDK that will allow you to extract files from MSI installers called “Orcas.” I opened Orcas.exe and extract the “Cabs” item in the msi file by selecting the proper item and choosing “Tables..Export Tables”

    This exported the contents of the cab file to disk.  In this case the Cabs node contained all the files I needed to run this utility.

     

    I extracted these files to disk, and could run the batch remove all that ugly code from my office HTML documents.  I wanted to blog about this, because it’s useful to sometimes just extract one tool from an entire installer. I don’t recommend that you go around hacking installer files, but it’s nice to know how to do it, when you need to. Wink [;)]

    -Brendan

  • Welcome Karl Seguin

    Welcome to the newest member of CodeBetter.Com, Karl Seguin.  Karl is a Microsoft MVP for Visual Developer - ASP/ASP.NET, and has written numerous articles on ASP.NET and AJAX.

    His blog is over here.

    -Brendan
  • CodeBetter.Com 2.0 and New Community Server HomePage Controls for Download

    This weekend we upgraded to Community Server 2.0 here at CodeBetter.  We have a new improved logo, and a new cleaner skin.  Our old site was getting a little long in the tooth. 

    I’m happy to report that CS 2.0 rocks!  The upgrade was seamless, and the new application seems to be working great for us so far.  Great job to everyone over at Telligent!  We’re all very psyched around here to have this new toy to play with.  The spam filtering stuff is outstanding, and there are many great new features. It’s a definite must-upgrade.

    Updated HomePage Controls
    I had previously created a set of controls that we use on our homepage here at CodeBetter.  If you need them for CS1 and CS1.1 you can get them over here.  For CS2, I had to tweak these a bit, so I upgraded these controls for CS2, and have made them available for download on the new CodeBetter File repository.  I created this version as a DLL that you can just drop in, so no modification of the CS source is necessary.   Here's what you get.

    1) FeaturedArticle
    Purpose: This control shows one featured article, along with the excerpt and the author’s avatar.

    2) AggregateCompactPostList
    Shows a configurable number of latest and most popular posts.

    3) AggregateCompactArticleList
    Displays an article’s category title, excerpt, and published articles.

    You also get a control that displays all the blogs by category, for the sidebar pane on the blogs page. 

    -Brendan

  • The VS 2005 Discussion Continues

    It's interesting, but the real conversation about VS2005 seems to have jumped over to Channel 9. Here's a great comment from over there, that completely sums up how I feel on the issue.

    My company is a 100% Microsoft Shop, but the 2005 line of products has certainly dampened the enthusiasm of the developer's and the help desk. Any of my coworkers who have used these products since their release, come away unimpressed regardless of how excited they were beforehand. Even our biggest in-office VS2005 cheerleader asked me after using the product for the two weeks, "How in the hell did they make it move so slowly?"

    I have to say, it's nice to know that I'm not alone here... I really hesitated to post yesterday on the issue, because it never feels good to be so negative about something as close to your heart as Visual Studio..

  • Visual Studio 2005... Uggh.

    I don’t usually Rant, but this post has been welling up inside of me for a number of months now, and today it just had to come out.   I’m sitting here very disappointed with the current state of things in the .NET world, particularly in relation to Visual Studio 2005. Now, I have all kinds of thoughts relating to this and how we’ve made things too complex in the .NET software development world, and in the world of computing in general, and how we’ve forgotten about ease of use, and why other technologies such as Ruby on Rails that embrace simplicity are going to be chosen in the long run if we don’t do something about all this, but this is just a rant about Visual Studio.

    Understand that I’m using VS 2005 pretty much out of the box, and there may be ways to hack and configure all this stuff so that it suits my needs.  Also understand that I realize that scores of people have put lots of time into this tool, and that there are many good things about it, but overall  I’m finding that my life as a software developer has become much more difficult since the advent of VS 2005.  Here’s a few reasons why: 

    1) They've messed up the support for Typed Datasets.  First of all, the DataTable adapter seems pretty unless for any real CRUD operations.  It works okay for filling a dataset, but I couldn’t figure out how to get it to update properly a DataSet with related tables, making it for me fairly unless.  Now every time I create a Typed Dataset, there’s a bunch of stuff I have to rip out.. Ugh.

    And haven’t they broken some pretty serious design rules by coupling a DTO like a dataset to the CRUD operations anyhow?  I think this is really where the “RAD KILLS” message from some of our bloggers hits close to home.  VS is basically BY DEFAULT trying to get me to create crappy, hard to maintain code, tightly coupled code. 

    2) It’s so slooooww.   As others have pointed out, some of the refactoring support is so slow that it’s almost unusable. But even when tabbing between code files, there’s a noticeable pause while VS thinks about switching to your new file.  This can really slow you down when you’re paging between lots of code files, which you have to do to work with a good layered application.  <sarc>Perhaps this wasn’t a big issue for MS, considering your entire application should be developed in one big RAD file.</sarc>

    3) It’s hard to find code files I’m working on.  As I work, I have a terrible time finding files I have open.  I used to just tab over until I found my file.  Now, once you reach a certain # of open tabs, they get pushed off of the tabs into the drop-down list.. I can’t tell you how many times I loose track of a file during the day and have to hunt for it.  Again, since you’re supposed to do all your work in one big file, I guess this wasn’t supposed to ever be an issue.  How many RAD files would someone ever have open anyhow, 2?  3 at the most?

    4) They’ve removed support for SQL 2000 Database Diagrams.  It’s there for SQL 2005, but for SQL 2000 Databases, it’s just gone!  Hey, um.. This was a feature I used, like, um A LOT! And uh, SQL Server 2005 is like NEW, and my company probably won’t be migrating for a while.

    So, the other day, I fired up VS 2003 because I had to do some db diagramming (see complaint #4 above).   As the trusty app launched I was filled with sadness that it’s gone. ReSharper popped up, and I smiled remembering the days where I could quickly re-factor, navigate to related code files, clean up code, create unit tests, and fire them off in NUnit with ease.  This feeling quickly passed, and today I’m back to VS 2005, forcing myself to use the complex built in unit testing tool, stripping crappy autogen code, waiting for files to load, and wishing ReSharper  would swoop in to save the day….

    Uggh. 

    Technorati Tags: , ,

  • Community Server 2.0 Coming Soon to CodeBetter and Thoughts on Focused Feed Blogging

    I’m in the final stages of migrating CodeBetter.Com to Community Server 2.0.    I want to congratulate Telligent with the great job they’ve done with this new version.  There’s lots of nice new stuff in the UI, all based on Component Art’s latest suite of web controls.  As a result, it’s a much much easier blogging and forum tool to use.  Great job Telligent!  There are a couple of custom controls that I need to write before I get CodeBetter upgraded, but that shouldn’t take long. I highly recommend ComponentArt’s controls… I’m using them on a few projects, and they are excellent.

    So, I’ve already done the upgrade from 1.1 to 2.0 over at CycleBetter.Com, and it went off without a hitch.  CycleBetter (familiar name huh?) is my attempt at creating a thriving community of bloggers around cycling.  It’s going pretty well, and beginning to thrive I sense. In fact, I’ve added 4 new great blogs this week. 

    Focused Feeds

    Speaking of CycleBetter, it’s my second attempt at creating a focused feed blogging site. I’m totally hooked on this idea of focused feeds.  I think it’s been a big part of our success here at CodeBetter.  We try and stay focused, that way, you don’t have to sort through a bunch of junk just to get to the good stuff.  At CodeBetter we also try to take it a step further here and not only stay focused but also stay lean – we try not to post the same stuff that you see everywhere else, focused or not.

    As far as I can tell, CycleBetter is one of the few, if not only, biking sites providing focused feeds for cycling blogs. There are plenty of sites that list cycling blogs, but not many providing focused feeds around cycling.  I’m hoping to branch out into other areas, but I’ve got to prove the concept first with CycleBetter.Com.   I’ll let you know how it goes…

    -Brendan

  • An Incorrect Server Time can Crash Your Applications!

    I was going to title this post “An Incorrect Server Time can Crash Your ASP.NET 2.0 Applications!” but I thought that would be too sensational… But, it’s true, my ASP.NET 2.0 apps pooped out due to a server time being off. .  Here’s what happened:

    The other day we started seeing one of our two web servers crashing.  We recently deployed our new public site onto ASP.NET 2.0, and everything had been working fine up until this point.  The strange thing about this server crashing was that both servers are identical hardware, had the same codebase deployed, and are load balanced with a Cisco CSS hardware.    Why one server would begin to fail and not the other was mysterious.

    Well, I went looking in the event log and saw this error, at regular intervals, every 5 minutes. It turns out that after a few of these, the server would crash, and we’d get “Service Unavailable” when browsing to that server.  This is what the event log looked like:

    Source: .NET Runtime 2.0 Error Reporting
    Event Id: 5000
    Description: EventType clr20r3, P1 w3wp.exe, P2 6.0.3790.1830, P3 42435be1, P4 microsoft.web.services2, P5 2.0.3.0, P6 42177cce, P7 eb1, P8 47, P9 e3hnjzi4pzb2exb3atbffdtvqefg3pm4, P10 NIL.

    What a great description, huh? Anyhow, I did some searching and found the following KB article that let me know what was causing the crash:

    Unhandled exceptions cause ASP.NET-based applications to unexpectedly quit in the .NET Framework 2.0

    When an unhandled exception is thrown in a Microsoft ASP.NET-based application that is built on the Microsoft .NET Framework 2.0, the application unexpectedly quits. When this problem occurs, no exception information that you must have to understanding the issue is logged in the Application log.

    Okay, nice feature.  Anyhow,  I knew that WSE was somehow involved (due to the web.services2 in the description) and that I had an unhandled exception in code somewhere (sloppy on my part).  I suspected a regular process since the errors were so periodic, and we do indeed have some processes that go off every 5 minutes and do some WSE stuff.  Well, finally with my trusty copy of SysInternal’s DebugView (which will show you Trace.Write, and Debug.Write output) I tracked it down to this error:  A WSE message failed to decrypt because it was “sent in the future.”  Sent in the future? Cool!  No wait, that’s impposible. I checked and sure enough, the server’s time was off by a minute. 

    So the time was off, the message wasn’t decrypted, WSE threw an exception, my sloppy code failed to handle it, and bang!  Dead server.. I thought I’d pass this along,  this was the strangest error fix I’ve had in a while!

    -Brendan

     

More Posts