| | Sun | Mon | Tue | Wed | Thu | Fri | Sat |
|---|
| 25 | 26 | 27 | 28 | 29 | 30 | 31 | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | 8 | 9 | 10 | 11 | 12 | 13 | 14 | | 15 | 16 | 17 | 18 | 19 | 20 | 21 | | 22 | 23 | 24 | 25 | 26 | 27 | 28 | | 29 | 30 | 31 | 1 | 2 | 3 | 4 |
Search
Navigation
Categories
Blogroll
|

Saturday, January 07, 2006

Wednesday, December 28, 2005
RPC In VPC
I spent some time earlier this week working with BizTalk 2004 in a Virtual PC 2004 environment. The VPC OS was Windows Server 2003 Standard and it was running separate from a domain. When I was at work I would used Shared Networking, whereas at home it would share my tablet's wireless card. I had problems from the beginning getting BizTalk installed, and then regular problems along the way related to operating when BizTalk would attempt to integrate with SQL, SSO, or other system services. The errors would vary, but they would invariably be complaining about the RPC server. For example, errors such as "Failed to generate the master secret (error code 0X80070005)" would come up.
The problem was the result of failed RPC endpoint resolution. BizTalk was configured to connect to other services via machine name, in this case "VPC-WIN2K3STD", since "localhost" is not allowed as an endpoint. Unfortunately, given the configuration of the server with the VPC in my mixed environments resulted in the OS not being able to resolve the name "VPC-WIN2K3STD" to an IP address. If a step in the process of installing or running an app fails, do the following:
- From the VPC OS' command line, run "ipconfig /all". This will tell you what its host name and IP address are. If you're using Shared Networking, expect 192.168.131.### where ### is between 2 and 251. If you're sharing the NIC of your host machine, expect it to be the same (I haven't verified that this is actually a problem when sharing a NIC).
- Edit the "hosts" file in "<system path>\drivers\etc" (probably "C:\WINDOWS\system32\drivers\etc") to include an entry for your local machine's name and its IP. Just follow the example used by "localhost" to see how this is done. This file is the first place the system looks to resolve a host name as an IP address before going to the DNS server.
- Retry the step that failed. It should work almost immediately, but I've found that sometimes it seems to take a few seconds to kick in (maybe the IP is cached somewhere?).
Keep in mind that if your IP address changes, you'll need to update this file. If you don't, things will likely stop working since your OS will be looking for a non-existent IP. This could happen when your VPC reboots, is rehydrated, or has its network connection changed.
12/28/2005 10:33:49 AM (Pacific Standard Time, UTC-08:00)

Thursday, December 15, 2005
Voluntary White Elepha--what?!?
When I first started using email years ago, I would often receive emails that were clearly not intended for me. As a nice Internet citizen, I would respond to these mails indicating that they had sent to the wrong address. However, I quickly learned that this was a great way to validate your email address on a spammer's hit list. Since then I've learned (along with the rest of the world) to just ignore email that wasn't for me, unless I had a really good reason to believe it was legitimately mis-sent.
Nowadays, I'll get a random SMS message every few weeks that looks legitimate, but intended for someone else. I ignored the first few, but I started noticing a pattern that makes me think that someone just miskeyed a phone number, resulting in all these messages being sent to me. As I've paid closer attention to this sender recently, it's clear that the last few have been business-related messages for another company. However, yesterday I received the following message (which I have edited with *s to remove identifiable info) that may clinch the validity:
***** is having a company Christmas party Friday Dec. 16th at 4:00 PM at the office. There is going to be appetizers and a voluntary white elepha
I've used the domain info from the source email to track down the company and am pretty sure at this point they're not spamming me (or verifying my number as a spam socket). I'm tempted to contact them directly and let the person who's been sending these to me that they have the wrong number. At the same time, I'm also tempted to just drop by this party and find out what a "Voluntary White Elephant" (I assume that's how the message would have ended) is. I'm also concerned that they may end up being pissed off that I didn't tell them sooner. After all, the poor dude who they thought they were texting may have been fired for saying he never received any of their messages.
A cursory search of this here InterWebtm indicates that "Voluntary White Elephant" is a "Secret Santa" game similar to "Yankee Swap" (which I had first heard of on last week's "The Office"). However, there's no way to be sure that's how the message would have ended without showing up at the party...maybe they'll really have an easygoing elephant that happens to be white. I just can't take that kind of risk.
12/15/2005 11:23:13 AM (Pacific Standard Time, UTC-08:00)

Tuesday, December 13, 2005
DirecTV Fined For Do-Not-Call Violations
MSNBC reports that DirecTV is being fined for hiring telemarketing firms that violated the DNC listings on their behalf. It's unclear as to whether any of these violations were directly performed by DirecTV employees, or whether it was just a case of their vendors breaking the rules and them being held responsible. Regadless, it'll be interesting to see if this has any implications for companies that hire spammers.
12/13/2005 10:31:11 AM (Pacific Standard Time, UTC-08:00)

Monday, December 12, 2005
The Mnemonics Are Gonna Get Ya!
I recently had the Pocket PC version of a Windows Mobile game rejected by VeriTest during the certification process. It was rejected because the app's menus had mnemonics (underlined letters to be used as keyboard shortcuts). Not having these has been a requirement for as far back as I can remember, so I was surprised they showed up--the .NET Compact Framework won't even let you turn them on. After doing some debugging I noticed something very odd--the mnemonics were showing up in the WM 2003 SE emulator, but not in the WM 5.0 emulator or on my WM 2003 device.

(Same bits on WM 2003, WM 2003 SE, & WM 5.0)
It turns out that Windows Mobile--for some time--has been smart about detecting attached keyboards and auto-injecting mnemonics into menu items, which is why the configuration I have across the emulators and devices showed up the way they did. I think this is pretty cool and another example of the little reasons why WM devices are such a pleasure to develop for (flame away
). Another nifty feature in WM 5.0 (as you can see from the screenshot) is how a two item menu on PPC will turn itself into a pair of softkeys to match the look & feel of Smartphone. Since this app was originally written for Smartphone and ported over (under 15 minutes of dev work!), it made things that much nicer.
Anyway, I raised the issue with Microsoft and VeriTest and it looks like this requirement may be changed so that you're allowed to have mnemonics when there's a keyboard present. After all, it would be a pain to stop the OS from putting them in, so why fight it?
By the way, you can buy this app for Smartphone or Pocket PC (they're actually the same CAB, but I can't figure out how to get Handango to let you have two different platforms for the same product). It's a .NET CF 1.0 app that runs on all Pocket PCs and Smartphones (except SP02 devices since those don't have .NET CF). Our 60% cut of every $4.99 purchase goes towards our mounting certification bills 
12/12/2005 8:17:29 PM (Pacific Standard Time, UTC-08:00)

Monday, December 05, 2005
The Forgetful Mouse
Most laptops have touchpads that ship with the most annoying consumer feature ever on by default: the "tap to click". As an aggressive keyboard user, I always seem to have my palm smack the touchpad, resulting in "clicks" at the most inopportune times, causing key commands being set to windows I thought to be out of focus, etc. I always disable this feature every time I get a new machine (which usually requires installation of stupid OEM apps as part of the driver process). However, my tablet's Synaptic TouchPad seems to be forgetful, turning it back on every once in a while. As first I assumed this was due to something crashing & reverting to the anti-user default. However, tonight I noticed for the first time that all the Taskbar Notification Area(TM) screenshots in Synaptics' Device Settings tab have the clock time set at 4:20. I suppose I should just be glad they don't replace my screensaver with a lava lamp and search my drive for twinkies every few hours.

PS: If you don't get the 4:20 reference, ask your kids. Then again, you probably don't want to know.
12/5/2005 3:12:12 AM (Pacific Standard Time, UTC-08:00)

Thursday, December 01, 2005

Friday, November 25, 2005
Crazy "Solution Path Too Long" Bug In VS05
Windows has a path length limitation of 260 for files and 248 for folders. I don't know if this is merely kept for backwards compatibility or if there's something more tangible in today's systems. Regardless, this limit is here to stay and I can live with it. However, I'm having a hard time dealing with the VS05 path limitation of 105 characters (which is inconsistent, depending on the length of the path to your base projects dirtectory). When you try to create a solution or project with a name VS deems too long, you get this gem:

The length of the path definitely doesn't "exceed the maximum path length allowed by the system". Even worse, following .NET conventions dictates that you should name a solution "CompanyName.ProductName", inside which there would be assembly projects with the name "CompanyName.ProductName.ProjectName". Needless to say, you can pretty much never add a project directly to a solution if you use the default location and .NET naming convention.
The workaround is simple. When creating solutions of projects, use a different path. For example, I like to use "C:\" to create the project:

Once it's created, close VS and move the project folder to the location of your choice. Now you can open the project in VS once again, or add it to another solution, depending on your needs.
I understand why this might be something useful to enforce once you reach 200+ characters, but if anyone knows why this happens right after 100, please let me know. I can't imagine this not showing up during testing, so I have to assume it's an explicit design decision.
11/25/2005 1:24:45 PM (Pacific Standard Time, UTC-08:00)

Sunday, November 20, 2005
Dealing With Newlines In Localized Resources
This week I was working on localizing a .NET Framework application and ran across an issue regarding newline characters. While I love almost everything about the localization infrastructure, it wasn't obvious how to embed newlines, so I figured I'd post it here to save other folks some time.
If you use the resource editor in VS (2003 or 2005), you won't be able to have multi-line strings. Like most other C# developers (I'll bet) I tried embedding "\n"s where I wanted the line breaks to appear.

Sure enough, it didn't work, which made complete sense in hindsight 
So how do you do it? Simply open the ResX file directly (in the VS XML editor or even notepad) and type the text *exactly* as you want it to be extracted. The text within the value tags will be taken literally, so type it however you want it to be kept.

The value tags all preserve whitespace, so newlines, spaces, and tabs are respected and carried throughout the compilation and extraction process. However, beware of any editor that "helps" you by automatically indenting a new line in the XML file.
I've found the need for multiline resources is mostly useful when dealing with dialog box text, such as when you need to explain options to a user. You should never try to line up labels or break paragraphs apart manually since it's incredibly difficult to manage it across multiple languages.
11/20/2005 2:25:57 AM (Pacific Standard Time, UTC-08:00)