Zip File Woes in Windows

zip thumb Zip File Woes in Windows

It’s happened twice now: I’ve sent someone a zip file, and they say they have problems using or viewing the contents.  One time it was a test build of an iPhone app, and another it was some HTML files.  After some questions and some headscratching, still stuck, I start a screensharing session with the person, and in each case they double click the zip file and attempt to directly access a file within it.

The problem here is that Windows presents a preview of a zip file’s contents as if it were like any other folder.  But that’s not the case.  If you have files inside the zip that depend on each other, they are never going to work correctly until you properly unzip them.  This is done by right clicking the zip file, and then clicking Extract All.

Screen shot 2011 05 18 at 12.19.21 PM 112x300 Zip File Woes in Windows

So I hope this message reaches Windows users who may not realize this quirk about zip files.  I also hope it reaches those who send zip files to Windows users, so that they can ask first whether they were actually unzipped first when problems come up.

Estimation

estimation Estimation

As a programmer, this always bugs me.  Not that it’s easy to get it right in many circumstances.  But if you aren’t sure your progress information is accurate, just show an hourglass or something.  </GEEKGRIPE>

WordPress Hack Roundup

cowboy rope lasso t Wordpress Hack RoundupOK well I only have two hacks actually, but i wanted to use this cool lasso dude image. Hence roundup. And notice how this text is wrapping around it? Well that’s hack #1. A client wanted to know if/how they could achieve this effect in their blog posts, and it actually took a little bit of doing. This WordPress support page deals with the issue. From there I got the CSS code (see below) I needed to add to my theme’s style.css file in order to make it work. Newer themes might already have it.

In any case, once it’s there you can set the text wrapping in your blog’s web console. When editing your post there, click an image, then the little picture icon that shows up in the upper left, and set the alignment as desired. I draft and publish my posts via MacJournal, and unfortunately as far as I can tell I still have to go into the web console to set text wrapping for an image.

Here’s the CSS code needed to make text wrapping on images work:

img.alignright {float:right; margin:0 0 1em 1em}

img.alignleft {float:left; margin:0 1em 1em 0}

img.aligncenter {display: block; margin-left: auto; margin-right: auto}

a img.alignright {float:right; margin:0 0 1em 1em}

a img.alignleft {float:left; margin:0 1em 1em 0}

a img.aligncenter {display: block; margin-left: auto; margin-right: auto}

Now, hack #2. We run on Windows web servers, which for WordPress is not entirely straightforward. But it seems to work just fine with a little tweaking. Still, I had a problem with auto upgrades and theme editing from the web console. And I put off looking into since it was just an annoyance. This support topic describes the problem’s symptoms and solution. Indeed, granting the Network group write permissions on the blog directory made auto upgrades and theme editing work.

Debugging a Visual Studio 2003 Web Project

Another Microsoft headscratcher solved, thanks to another blog. But I only got past my sticking point with the help of a comment about halfway down a slew of comments on the post. So hopefully highlighting that helps someone else. Or if you’re still stuck, pour over the rest of the comments. Problems like these rarely have one neat solution for everybody. Here’s the text of the post reproduced:

Ever seen this error when debugging a web app in the VS.NET IDE:

Error while trying to run project: Unable to start debugging on the web server. You do not have permissions to debug. Verify that you are a member of the ‘Debugger Users’ group on the sever.

Well, search the net and you’ll get 100s of hits talking about .NET debugging options, IIS configurations, permissions, admin access, etc…. In my case everything checked out and still no luck. Well here’s another cause of this error: adding http://localhost to your Trusted Sites list…. Yup that’s right. Sounds simple, but that’s what did it in my case….

And the comment which got me debugging again:

Just wanted to share an additional tidbit. After trying everything listed here without success, I tried moving localhost from the IE “trusted sites” zone to the “local intranet” zone – and voila! Not sure what the difference is, but it worked.

Note the remarkable similarity, yet frustratingly subtle difference between the solution to this problem, and the one I posted about here.

Debugging a web project in Visual Studio 2005 on Vista Home

I had the *ahem* pleasure of trying to get a Visual Studio development environment up and running on Vista recently. Most of the installation and configuration seemed generally straightforward. But debugging a web project just WOULD NOT WORK. It wasn’t even straightforward for a Microsoft support engineer to eventually arrive at the quite simple solution.

Here are the details, in hopes some other poor soul in the same boat can find this. Our environment was Visual Studio 2005 on Vista Home Premium (be sure to get the Vista-specific update for VS2005). And when trying to debug a web project the IDE would go into debug mode but then drop right back out of it, with no error message.

The solution was to add localhost as a trusted site thusly (need to have that https box unchecked before adding):
picture14 Debugging a web project in Visual Studio 2005 on Vista Home
click for full-size version

IIS 6 Default Settings

Here’s a couple quick tips for things I recently figured out in IIS 6. Sidenote – I just saw whatever IIS version Vista has, and it’s TOTALLY different. Not sure what’s in Microsoft’s latest server OS, but if it’s along the same lines I hope all the differences add up to improvements and are relatively easy to figure out. Wouldn’t hold my breath about that. Anyway, here are my version 6 nuggets:

  1. By default, the referrer log data type is not selected. So your logs won’t include that unless you specifically enable it. Seems like you would almost always want to know that.
  2. In order to get those kinds of settings applied by default to newly created sites, set them on the properties of the folder in which your sites are created in IIS.

Visual Studio 2005 Service Installer

serviceicon Visual Studio 2005 Service Installer

I needed to create a service with Visual Studio 2005. I had done this with 03, and apparently there’s some new stuff in 05 that’s not entirely intuitive. I had some significant head scratching and googling until I finally saw my new service show up in the Windows service control view. In my research this blog post turned out to be the most complete and helpful set of instructions on how to actually get a service installed:

http://www.grinn.net/blog/dev/2008/02/windows-services-in-c-part-2-adding.html

Matrix Runs on Windows

The humor is late-90’s (poking a stick at Microsoft), but the high production values surprise me. It’s getting harder to tell if a “real” studio or an individual makes what we see on the Web.