in

Bunker Hollow

Matt Williamson's home on the web, welcome.

Matt Williamson’s Blog

Personal discoveries of an IT professional.
  • Philadelphia to Chicago (778 miles) in Under 12 Hours

    I think this is blog worthy.  My fiance and I made the drive back from Doylestown, PA to Downers Grove, IL in under 12 hours; setting our own personal best (and quite possibly a world) record.  We were on the road with a full tank of gas at about 5:45am EST.  Astonishingly, we pulled into the driveway some 11.5 hours later at 4:15pm CST (5:15 EST).  We only stopped twice, each time when the tank was almost empty and were home in time to watch 2 full games of football.  Giddyup.

    http://maps.google.com/maps?f=q&hl=en&geocode=&q=doylestown,+pa+to+downers+grove,+il&sll=37.0625,-95.677068&sspn=41.682395,73.037109&ie=UTF8&ll=40.880295,-80.991211&spn=9.979995,18.259277&z=6

  • Introducing the American Academies of Sports Practitioners!

    It's been 9 months in the making and the American Academies of Sports Practitioners (AASP) is finally live!  I was given the logo you see above and I built the entire site around it, mostly from scratch.  I implemented a forum system using YetAnotherForum.  The animated heading text is from a script I purchased from Angus Turnbull and the scrolling logo script I acquired from DynamicDrive.  Everything else I've created on my own, check it out at http://sportspractitioners.org/.

    For those interested in the tech specs, I created a multi-tier design as follows:

    • Data Storage - SQL Server 2008 database using the ASP.NET Membership Framework.  I then added an additional database when I implemented the forum component.
       
    • Data Access Layer - C# .NET Framework 3.5.  This class library includes all of the LINQ to SQL dbml files I created to access the database, as well as a few custom data access classes.
       
    • Business Logic Layer - A C# .NET Framework 3.5 class library that contains the business logic for this application.
       
    • Presentation Layer - A C# ASP.NET 3.5 Web Application.  I used various AJAX controls as well as custom Javascript and CSS classes.

    I developed everything locally and would publish to a development server accessible publicly on an obscure port.  This helped my colleagues to test the site remotely and provide feedback.  I've finally published the site using hosting I purchased from DiscountASP.NET and I've been very pleased with their service so far.  The online tools are excellent and the webmail client is far superior to what GoDaddy provides.

  • ASP.NET Site Hangs Forever When Accessing Database via LINQ to SQL

    I finally published a project of mine to some hosting I purchased from DiscountASP.NET.  I'm very pleased with their service and minus the inability to contact them by phone, I prefer them over GoDaddy.

    So after purchasing all the Add-Ons I needed, I backed up both of my databases and restored them to my hosted databases.  I then updated my connection strings and tested them out by connecting to the remote databases using SQL Management Studio (very cool).  Next I published the site via FTP and then manually verified all the files transferred correctly.

    Next I browsed to the homepage and it hangs forever.  Actually, if you wait a very long time, you get a generic error saying the request timed out.  I would have appreciated a more descriptive error message, as it took me several hours to discover the problem.

    My data access layer (separate project) contained an app.config with settings for each database.  I copied those connection strings to my web.config and replaced the keys with the correct settings from DiscountASP.NET and everything ran fine.  Problem solved.

  • Finally Back Online!

    The day we drive half-way across the country is the day my system decides to stop working.  While driving home for the holidays a friend let me know the site was down and from my fiance's iPhone I was able to determine the whole system had lost connection to the internet.  My website, email, FTP, and all other servers were inaccessible.  It was as if my cable modem was unplugged.  I had absolutely no access to the internet.

    My first thought was a power outtage since we had left behind some nasty winter weather.  The problem with that theory is that every vital machine is hooked up to a rather large battery backup and they are all configured to 'Last State' BIOS power settings.  So even if the power was out long enough to kill the battery backup, it should all come back on anyway, when the power is restored.

    My next thought was that my IP address changed.  This would be good news, I could call Comcast, obtain my new IP address and fix everything remotely.  So I called Comcast and, unfortunately, they determined that my cable modem had no connection at all.  In desperation I called my landlord who was nice enough to stop by and give me the scoop via cell-phone.  To my dismay, all the machines were on and humming away, and he wasn't aware of any power outtages.  I asked him to simply unplug my cable modem and then plug it back in.  Within a minute or so I could access my website, woo-hoo!  I thanked him kindly and we both went about celebrating our holidays.  But by that evening, everything was inaccessible again... GRRRR!!!!

    So now I figure I need my very helpful landlord to reboot all of my devices, not just the cable modem.  Unfortunately, he's now gone for a few days and I simply have to wait for him to get back to me.  It's been an entire week and now all of a sudden at what appears to be around 3:25am this morning, my emails starting coming through.  I just checked the site and here I am, back online and I have no idea why.  Below are some quality RRD graphs from my firewall.  Using these and my firewall logs I'm going to try and determine what happened, but so far I don't get it.  As you can see there was some serious packet loss and then just no connection at all.  (The slight gap around 5:50 this morning was me rebooting the firewall).


  • The Camcorder AV Cable, Who Knew?!

    It's not often that an older piece of technology blows my mind, but it happened this week and I'm still reeling with disbelief.  I had no idea this cable existed until a couple of days ago!  It's simple enough; a triple-band 3.5mm (headphone) jack at one end and 3 composite (red, white, yellow) RCA plugs at the other.  While we're not talking high-definition audio or video fidelity, we are talking convenience and simplicity for all of those portable media players we have these days.

    I picked one up at Radio Shack tonight, 3m cable for $30, a little pricey but at least it's plenty long.  I brought it home and plugged it into my tv and turned the Zune's TV Out display setting on.  The speakers buzzed with half music and no video came to the screen.  Apparently the zune feeds video on red and audio on yellow and white, whatever.  I switched the cables around until I got it right and there we go.  My portable media collection is ready for family and friends with a simple cable.  Perfect for the holidays, I'm loading up my Christmas tunes tonight.

    A big thanks to one of Scott Hanselman's latest posts, otherwise who knows how long this fun little cable would have evaded me!

  • Add a GoDaddy SPF Record

    It's about time I installed an SPF record for my domain.  Since I host my own Exchange server, I sometimes run into email issues since I'm forced to send all my email through my ISP (Comcast).  This can result in problems since all Comcast IP addresses are listed in the Spamhaus Policy Block List.  Legitimizing your IP and domain can be tough if you're in this type of situation, but adding an SPF record is a step in the right direction.  Here's how I've setup mine:

    GoDaddy DNS Host Configuration

    • My domain's DNS host settings are simple.  In GoDaddy's Total DNS Control Panel I linked my root host (@) to point to my public IP address.  All other 'subdomains' point to a GoDaddy server that redirects them to URL's I've specified.

    GoDaddy MX (Mail Exchange) Configuration

    • My primary record sends all mail to my domain, which is sent to my public IP as specified above.
      10 @ bunkerhollow.com
       
    • My secondary record is a backup service I have with DynDNS.  Any email that fails above will be sent to mail backup that stores messages for something like 30 days.
      20 @ xxx.mailhop.org

    Exchange Configuration

    • My Exchange server handles all SMTP traffic coming into my domain.  In other words, all SMTP traffic is forwarded to my Exchange server (EDGE server actually) by my firewall.
       
    • As required by my ISP, all SMTP must be sent through them.  So, my SMTP outgoing connector sends all mail through smtp.comcast.net.

    Adding a GoDaddy SPF Record

    1. Open Total DNS Control Panel -> TXT (Text) Section -> Add New SPF Record.
       
    2. Inbound Tab -> Check All Inbound Servers May Send Mail
      Inbound Tab -> Check Exclude all hosts not specified here (-all)
       

       
    3. Outsourced Tab -> Add comcast.net
       

       
    4. Click OK.  Note your final SPF Record:
       
      v=spf1 mx include:comcast.net -all

    Verify Your SPF Record

    References

  • .NET Line Numbers Missing from Debug Stack Trace

    I thought I had done a thorough enough job of using Try Catch blocks and descriptive custom exceptions so that I'd know exactly where any error occurred in my application.  Alas, I did not.  Debug information with line numbers is the single most valuable piece of information you could want while debugging and I'll never try to go without it again.

    Silly enough, in my case there was no reason to go without it in the first place.  I just didn't need a line number until now, so I didn't even realize they were missing.  Now that I've determined they are missing, it's taken me a little while to figure out why!

    1. In my solution I created my own Build Configuration.  Visual Studio ships with two by default; Debug and Release.  I wanted a configuration to sit between those two, so I created DEV.  For local development I would use Debug, I would deploy to my test server using DEV, and when it comes time to publish it to my host I'll use Release.  The problem I'm having occurred when I created DEV, I believe it asked me to inherit the settings from Debug or Release and I chose Release.  (I thought I'd be fine with my custom exception handling... tisk tisk).
       
    2. So the only thing I have to do is set my DEV build configuration to use the same settings as Debug.  This is actually done within the Properties menu of each Project in your Solution.
       
    3. Right-click each project -> Properties -> Build Tab. 
      Check Define DEBUG constant and Define TRACE constant.
      Click Advanced button and set Internal Compiler Error Reporting to prompt and Debug Info: to full.
       

       
    4. Make sure you set debug to true in your web.config.
       
    5. Now in Configuration Manager, you can set which build configuration to use for each project when you specify a master configuration.  For some reason, some of my project's aren't able to use DEV, so I set them to Debug instead.  Not sure why this is the case, I haven't figured that out yet but it doesn't matter since I get the result I'm looking for.

    That's it!  Now you'll find those precious line-numbers in the stack trace.

  • Working with YAF Source Code from SVN Repository

    I've been working with YetAnotherForum for a while now.  It's an open-source .NET forum control written in C#, and it's great software.  I've made some contributions here and there with a smiley pak, an avatar collection, and helping others work problems on the forum.  Today I've decided to take the next step and contribute code to the project.  As an open-source project the YAF source code is available to anyone, it's stored on a SourceForge SubVersion repository at the following address:

    https://yafdotnet.svn.sourceforge.net/svnroot/yafdotnet

    I'm documenting the steps I took to get the source code up and running locally, for future reference.

    Connect and Obtain the Sourcecode from the Repository

    1. Create an account with SourceForge.Net.
        
    2. I'm running Vista x64 Business Edition, so I need a SubVersion (aka SVN) Windows client.  Download and install TortoiseSVN, the best SVN Windows client out there.
       
    3. After installation and a system reboot, you'll notice TortoiseSVN has been incorporated into your right-click context menu.  Choose "SVN Checkout...".  The url of the repository for the YAF project is above, and then choose a local directory that will mirror the repository.
       

    Setup Solution for Development and Compile

    1. Create a new local database named yafnet.
       
    2. Open yetanotherforum.net.vs2008.sln with Visual Studio and go through the conversion process (I don't think a backup is necessary).
       
    3. Modify the properties of each project in the solution to use the .NET 3.5 Target Framework.
       
    4. In the website project (YetAnotherForum.NET), delete the web.config file in the root.  This was created automatically when you changed the target framework.  Copy recommended-NETv3.5-web.config from the webconfigs directory into the root and rename it web.config.
       
    5. Edit web.config and change compilation debug to true.
       
    6. Edit web.config and add minRequiredNonAlphanumericCharacters="0" to membership provider string.  During YAF installation in the next steps, when I create a new admin his password doesn't contain any weird characters.  If I don't add this attribute then installation fails with "password invalid" because the default is 1.
       
    7. If you compile the solution at this point and receive 4 errors of:
       
      Compiler Error Message: CS0433: The type 'System.Web.UI.ScriptManager' exists in both 'c:\windows\assembly\GAC_MSIL\System.Web.Extensions\3.5.0.0__31bf3856ad364e35\System.Web.Extensions.dll' and 'c:\windows\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll'
       
      Edit your web.config and add the following code beneath the <system.webServer> settings:
       
      <runtime>
            <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
              <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
              </dependentAssembly>
              <dependentAssembly>
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/>
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/>
              </dependentAssembly>
            </assemblyBinding>
          </runtime>
       
    8. Compile the solution, should be successful.

    Setup Solution to Debug Using IIS

    1. Open IIS and create a new website.  Set the site's physical path to that of the website project directory.
       
    2. In Visual Studio, right-click the website project and choose "Start Options...".  Choose Server -> Use custom server -> Base URL: http://localhost/.

    Install YAF Locally

    1. Set website project (YetAnotherForum.NET) as Startup Project.
       
    2. Set /install/default.aspx as Start Page.
       
    3. Edit app.config and set your configPassword for installation.
       
    4. Debug the solution (F5), enter your password, attempt to install full text search support, and install YAF!

    Committing Changes

    1. Try and make sure you have the latest source code, by 'Updating', before you edit code and submit changes.
       
    2. Commit changes by right-clicking your modified file and choosing 'SVN Commit...".  Simply enter a description and then your username and password.  If you're just starting out, you won't have permission to commit changes and the process will fail.  Instead, you need to create a patch, as described below.  You will need to contact the YAF admins to be added as a developer with commit privileges.

    Creating a Patch

    1. If you do not have YAF repository commit privileges, you will need to create a patch.
       
    2. Verify you have the latest source code before editing it and creating a patch.
       
    3. Right-click your modified file -> TortoiseSVN -> Create Patch...
       
    4. Save your patch locally with an appropriate name and email it to support@yetanotherforum.net.

    Enjoy Contributing to the YetAnotherForum Project!

  • Change Visual Studio 2008 Web Development Debug Server

    I'm experiencing an odd exception when debugging locally but everything works fine when it's deployed to a remote development server.  Someone suggested I use IIS locally when debugging, instead of the built-in Visual Studio Development Server (which I believe is called Cassini).  So here it goes:

    1. Verified IIS is installed locally (IIS7), delete the Default Web Site and create a new one.
       
    2. Map your new website's physical path to your application's website project directory.

       
    3. Click test settings, if you receive the following error:
      Test Connection Authorization Cannot verify access to path (c:\projects\yoursolution\yourwebsite)


      Close this warning and specify an administrative user to use.  Input the credentials and re-run the test, it should pass successfully.
       
    4. Open your solution in Visual Studio and edit your website project's properties.
       
    5. Web tab -> User Local IIS Web server -> Project Url: http://localhost/ -> Save.

       
    6. Start Debugging ... if you encounter a runtime error, verify you have the correct Application Pool selected in your website's IIS settings.

    Troubleshooting:

    1. You may receive this error at some point:
      The Web Application Project xxxxx is configured to use IIS.  To access local IIS Web sites, you must run Visual Studio in the context of an administrator account.  In addition, you must install the following IIS components: IIS6 Metabase and IIS6 Configuration Compatibility, ASP.NET, Windows Authentication.

       
      Solution:  Verify you have those 3 Windows "Features" installed.  If you do, then Visual Studio isn't being run as an administrator.  You can right-click the shortcut and choose "Run as administrator", or fix it permanently by right-clicking the shortcut -> Properties -> Compatibility tab -> "Run this program as an administrator".

    That's it!  And thankfully this did fix the unusual error I was seeing when debugging with the built-in Visual Studio Development Server.

  • Remote Desktop Command Line Disconnect

    Do you ever remote into many RDP sessions at a time?  Have you ever played that really fun little game where you try to 'catch' the one drop down RDP pin menu that you want to close without closing down the entire session?  You'll know what I'm talking about if you remote in a machine, and then remote into another from that one, and so on.

    I do this often and usually I'll just Log Off to avoid messing with the drop-down menu, but I'd really just like to disconnect instead.  Today a thought occurred to me... disconnect from the command line!

    Run -> tsdiscon

    Reference:
    http://badmark.com/2006/09/27/How+To+Disconnect+A+Remote+Desktop+Session+From+A+Command+Line.aspx

  • Bunker Hollow Statistics and Summary After 1 Year

    My website and blog have been online for over a year now.  I launched September 28th of last year which is just a little shy of 14 months ago.  I figured it's time to look back and analyze my progress and I'm actually excited about some of the suprising results!

    Blog Statistics

    1. 190 posts
    2. 80 comments
    3. 5 Trackbacks/Pingbacks
    4. RSS Subscribers unknown ... maybe I'll activate the Feedburner Standard Stats.

    Website Statistics

    1. 10 Photo Galleries (can't get any more without upgrading Community Server which costs thousands!)
    2. 10 Files for download and 1,345 downloads!  Not too bad.

    Google Search Result Status

    1. Matt Williamson - 10th result.  I'm on the front page baby!  Woo hoo!
    2. Matt Williamson Blog - 2nd result!
    3. Bunker Hollow - first result.
  • Visual Studio 2008 Find in Entire Solution Fails

    Well this is new!  I just ran a global search in my solution, like I do a hundred times a day, and it failed with this generic error message in the Find Result window:

    Find all "FIND ME!", Subfolders, Find Results 1, "Entire Solution"
      No files were found to look in.
      Find was stopped in progress.

    The solution is to press CTRL+Break a bunch of times.  Weird.

    Reference:
    https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=105511&wa=wsignin1.0

  • ASP.NET Horizontal Menu Items Won't Center in FireFox

    This took entirely too long to figure out.  Hopefully this will help someone else fix it more quickly.  If you have a horizontal ASP.NET menu where all of the buttons are centered and looking great in IE, but will remain left-aligned in FireFox no matter what you do, just wrap the menu control in a -Moz-Center div tag like so:

    <div style="text-align:-moz-center;">
         <asp:Menu ...>
         ...
         </asp:Menu>
    </div>

    References:

    http://forums.asp.net/t/1189032.aspx

  • GoDaddy Email + Comcast + Spamhaus = Pain in my Ass

    The Situation:  I'm testing my web app on a server in my basement, connected to the internet through Comcast.  The app should send email at various times to mailboxes I've setup with my GoDaddy domain.

    The Problem:  Some emails come through ... most don't!

    The Reason for the Problem:  The email being blocked contains a hyperlink to the server it's being sent from.  The URL in this hyperlink resolves to the IP address given to me by Comcast, which is actually flagged in the Spamhaus Block List!

    ... Why am I being flagged? ... Why me?!

    Well, Spamhaus gives you a reason for being blocked and here is mine.  According to the Spamhaus Policy Block List (PBL), all IP addresses starting with 24.xxx.xxx.xxx are flagged!  Turns out there are over 16 MILLION IP addresses who will suffer the same fate.  Who's to blame?  Spammers.  Is this a good solution?  Hell no.  Hopefully SPF will put an end to this madness.

    Solution:  I guess I'll remove links to my own server.

    Better Solution:  Get an ISP with unrestricted access to the internet!  I've heard good things about SpeakEasy.Net, but I haven't tried them out yet.

  • Exchange 2007 EdgeSync Application Log Error "The Supplied Credential is Invalid"

    My Exchange Server application log in the Event Viewer has been constantly throwing the following exception:

    The connection to the ADAM instance of the Edge Transport server failed with the exception "The supplied credential is invalid."

    I suspect this has been happening since an Exchange Update Rollup or possibly since I installed Exchange 2007 SP1.  What's interesting is that it hasn't affected my mail delivery at all, to my knowledge.  I only stumbled across it because I felt like checking out the app log on a whim.  To verify that the problem exists, run Test-EdgeSynchronization from the PowerShell and you should see that it fails:

    The Solution is to re-subscribe your Edge Transport Server connection.  I've already done this in reference to another issue, so I'll just post the link here:

    http://bunkerhollow.com/blogs/matt/archive/2008/06/04/reset-edge-transport-server.aspx

More Posts Next page »
Powered by Community Server (Non-Commercial Edition), by Telligent Systems