Wednesday, October 17, 2012

Port 80 - The Friday the 13th of Web Server Issues

To paraphrase the late Ronald Reagan, after installing WebMatrix 2, "There you go again!"
Of course no sooner was WebMatrix 2 in use, I found my Wamp Server, which I now regret assigning to port 80, failing to start again. Apache couldn't open its logs.
The long and the short of this is:
1: The culprit was one that came back from the dead, Web Deployment Agent Service, resurrected by WebMatrix, which I needed for hosting MicroHard's IIS Express on my old creaky Windows XP system.
2: The solution (I hesitate to label it Final Solution, for both sensitivity and expectation issues), is to go into your registry.
3: First go into services from control panel/administrative tools, and stop that service.
4: Then go to: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services
  • Scroll down the long list to MsDepSvc
  • Choose Parameters, and open ListenUrl to modify.
  • By default, unless you custom installed from the get go, should be: http://+:80/MsDeployAgentService
  • Change the 80 to whatever port you want to fob theis service off to.
  • In my case, I chose 8080. New value: http://+:8080/MsDeployAgentService

5: Reboot.
Keep track of your server ports, if you're like me and have begun to collect web servers like coins. I gave 8081 to Bitnami, 8082 to SQL reporting services, etc.

Thursday, October 4, 2012

jQuery $.getJSON is NOT Jason from Friday the 13th

Although at times $.getJSON can certainly seem like a maniacal mass murderer to those not used to working with it.
Tips for the unwary and clues for the clueless.
When iterating through data returned by $.getJSON, make sure you know when to refer to the subscripts as numeric arrays as opposed to associative arrays.
EG: From a typical json file:

"customers": [
{ "id":1,"name":"John Doe" },
{ "id":2,"name":"Sand Wich" },
{ "id":3,"name":"Meanmissus Jones" },
{"id":4,"name":"Hung Lo"},
{"id":5,"name":"Cardin Naal"}
"magazines": [
{ "id":1,"name":"Field and Wild","rate":29.99 },
{ "id":2,"name":"Car and Driven","rate":34.95},
{ "id":3,"name":"Unpopular Scientists","rate":42.95 },
{"id":4,"name":"TV Lied","rate":19.99},
{"id":5,"name":"Readers Indigestion","rate":24.99}
{"1": [{"id":2,"startdate":"01/01/2012","enddate":"01/01/2013"},
"2": [{"id":1,"startdate":"01/01/2011","enddate":"01/01/2013"},
"3": [{"id":2,"startdate":"09/01/2011","enddate":"09/01/2012"},
"4": [
"5": [{"id":1,"startdate":"01/01/2011","enddate":"01/01/2013"},


Say you're in a for loop, using i as the iterator to run through subscriptions, and starting i at 1: data.subscriptions[i] does NOT equal data.subscriptions[1], as in the 2nd subscript of a numeric array. It equals data.subscriptions['1'], with '1' (variable i's value) being the key, and the 3 groups of subscription data following it as the value (itself a numeric array in this case). For magazines and customers, however, magazines[i] would equate to magazines[1], the 2nd subscript (Car and Driven). In iterating through subscriptions, we're first going through the associate array from keys 1 through 5. Each of those contains a numeric array. If i2 starts at 0 for going through that array and i still ='1': data2.subscriptions[i][i2].id refers to data2.subscriptions['1'][0].id, the first subscript under key '1', with a value of 2. data2.subscriptions['1'][1].id equals 4, data2.subscriptions['1'][2].startdate = "01/01/2011", etc, etc.

Tuesday, October 2, 2012

Not So Fast Wise Guys!

Well ho dee do, if good ole Flickr, or should I say Yahoo, didn't hit me with a 200 most recent uploads visible limit unless I upgrade to a paid account.
Well that sure as heck ain't about to happen, fellas!
I've got eons worth of storage for my stuff on Facebook. What do I need y'all for?
I'll keep what I put on y'all thus far, but I'm a po' folk right now and you can't have any of my assets, such as still exist.

Just Opened a Flickr Account for Streetlights Site

New Flickr page for Streetlights Site is at What the heck. If they're giving me the space, why not use it?