British Inside

An Englishman living in small town America

ASP/ASP.NET Web Hosting: 3 Months FREE + FREE Setup, CLICK HERE!

DiscountASP.NET now offers Windows 2008/IIS7 Web Hosting: CLICK HERE for Info!
  • ASP.NET 2.0 Hosting
  • ASP.NET AJAX Support
  • LINQ & Silverlight Compatible
  • SQL 2005/2000
  • CLICK HERE!

  • Kinda Relative URLs

    After developing for *cough* some time it's not often that I come across a new style of URL that I've never even heard of before.

    A few days ago I saw a forum post about a 404 message someone got about their geotrust smartseal badge. I followed up and found that the javascript that geotrust supply has a URL style that I've never seen before - note below that there is no protocol!

    <SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript" src="//smarticon.geotrust.com/si.js"></SCRIPT>

    ..and two leading //.  

    Then I noticed that the Authorize.net badge on the same page was very similar:

    <script type="text/javascript" language="javascript"
    src
    ="//VERIFY.AUTHORIZE.NET/anetseal/seal.js" ></script>

    Google wasn't helpful for this, but after asking around on some technical lists I got an answer from Adam Sills.

    Look at http://www.webreference.com/html/tutorial2/3.html and you'll see that..

    "A relative URL that begins with // (two slashes) always replaces everything from the hostname onwards."

    You really can learn something every day. This is clever actually, because it means that no matter if your page is being requested as http or https the badges will be requested with the same protocol - meaning that you won't see any security warnings.

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    Dealing with Mrs Jobsworth

    From wikipedia:

    A jobsworth is a person who uses his or her job description in a deliberately obstructive way, "a minor factotum whose only status comes from enforcing otherwise petty regulations". The term comes from the phrase "I can't do that, it's more than my job's worth."

    You may not be familiar with this term in the U.S. but in England it's a very common phrase.  My wife's been involved with one of these people for a few weeks now and this morning I think we're close to seeing a meltdown. Soon this "official" is going to be feeling the wrath, and I'm staying in my office until it's over, thankyouverymuch.

    My wife wants a part-time job. She figures the school system is a good place for this, so she applied to the local county school system. After submitting forms, applying for open positions, etc we get this email.

    "Dear Mrs Shaw, We need proof of your graduating high school" or words to that effect.  

    Aaah, well, you see in England we don't graduate high school. You just kinda..leave. You take exams, sure, but no-one here knows what a CSE, GSCE, etc are. Or cares.

    So, we contact the old school. They send emails and finally a fax on headed paper to the county saying that my wife had left high school with good grades, passed exams and could have gone to college.  

    (Apparently, "could have gone to college" is a key phrase here, because only people who graduate high school can go to college)

    None of this helped, unfortunately. 

    Mrs Jobsworth at the Henry County School Administration says that the correct words weren't used. The FIVE emails and letters that have been sent from the English school JUST WON'T DO. Sorry, she spoke to her supervisor but they still need a certificate or something.

    We don't want to cause the poor woman in England any more grief, so we're probably going to drop the whole thing. But as you can imagine, my wife is pissed.

    It got me thinking though, isn't this a subtle form of racial discrimination? Aren't schools the world over going to have trouble producing a high school diploma?

    This is the problem dealing with jobsworth's - you are almost always better off just walking away before you say or do something you regret later..

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    Now deleting spam

    Until today I have been reviewing my gmail spam folder each day or so, and marking all new spam as read when I've reviewed it. Most of the time that works ok, but I've noticed that there are times when I get spam with a presumably deliberately wrong date - maybe a few years ago.

    That's quite clever of them really, in a way, because it means that I don't see it in my first page of spam.

    And it's pretty dumb of them in another way, because, well, I don't see it. Not making much money off viagra if no-one sees the email, guys!

    In any case, typing in the "in:spam is:unread" to find them got too much for me today, so I switched over to a new method. Rather than marking as read, I now review spam and then hit the "delete forever" link.

    As a little bonus, I get a "feel-good" message back from Google each time!

    Hooray, no spam here! 

    Thanks Google, you old kidder!

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    Networking Equipment and how to return it

    First, always keep the wrapping, even the little twisty ties that keep the wires tidy. Keep the paperwork and the CD's - and I try to open the tamper-proof stickers with a sharp knife so that I don't rip the paperwork.

    I'm getting very good at this because I've returned multiple routers and associated equipment in the last month.

    I was trying to move from my very reliable but old and slow 802.11b router you see. It has a huge range (my office is 100 feet and 5 walls away from the router) though. The 11mbps just wasn't cutting it though when I had a couple of RDC's open and my daughters got onto myspace and youtube in the evening.

    My first attempt was an N+ router - great, but the range sucked and no expanders are available yet. Plus 802.11n is a draft spec and there were some issues although I can't remember what they were now.

    Next was a Belkin G+ MIMO F5D9230-4 router. Setup easily, worked perfectly with all the laptops and desktops in the house. Out in the office there was still good signal and I was getting 48mbps most of the time. Just one problem; every few minutes all my IM windows would go dark and then reconnnect. Same with RDC - continually trying to reconnect - trust me that's just not going to fly in my job.

    It's not my setup - it's a known problem with this router. Gamers were all over the networking forums posting about this router because of course it was dropping them out of their games all the time.

    Last night I went back to best Buy again, this time I chose a linksys WRT54G2 - new version of the WRT54G which has to be the most well-known router ever. Great, everything worked but signal sucked a little. Down to 1-2 bars and 11mbps in the office. So I got a WRE54G expander which in theory takes the signal from the limits of the wireless router and sends it out again - doubling the range.

    In theory.

    The first one had issues, I couldn't set it up wired or wirelessly, automatic config or manual. The infamous red light that apparently many people get. Linksys tech support (India division) tried a few things then told me to take it back to the store. "How old is it sir?" "four hours"...

    Another 10 miles and back to Best Buy. Another $3.49 in gas.

    I got a replacement and it did setup correctly. And it worked - it took a poor signal up to 3-4 bars and 11mbps to 36/48mbps. Awesome!! But I know from experience that "getting it working" isn't the same as "does it work during work hours".

    Today proved that yet again - first up, my little google desktop CPU gadget was showing my CPU going up and down. Sure enough, task manager showed that the network card was bouncing between 0-40% CPU, every other second. Hmmmm.

    Then I got a popup; "There is an IP address conflict with another system in this network". Uh-oh.

    A few minutes later, same error.

    In the event log I see this:

    The system detected an address conflict for IP address 192.168.1.102 with the system having network hardware address 00:1D:7E:A0:C2:BE

    Ok, not sure what's going on here because the router shows the DHCP clients and none of them clash. In any case, I'll set the IP address manually on this PC.

    10 minutes later, same popup.

    I go and turn off every other computer on the network.

    10 minutes later..you get the idea. I google it, lots of would-be nerds giving the same old advice, blah, blah, but then I realize that I can look up what device I'm conflicting with by MAC address.

    It's the expander itself. Odd? I thought so, especially since I just changed the IP address 10 minutes ago - AND NOW THE EXPANDER IS USING MY HARDCODED IP ADDRESS Tongue Tied

    Needless to say, it's back in the box with receipt ready to go back home with its buddies tomorrow.

    I'm just worried that one of these days Best Buy are going to stop me buying stuff.

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    Today's not the day to read blogs

    Don't believe anything you read today. I know better, but I still forgot the date and believed Daniel had sold his company.

    His post was very well done, but I still think my old April Fool's Joke was better. Back in 2005 it was more believable I guess. I had a load of congrats emails that day, and I felt quite mean telling people I was only joking.

    Hell, I was quite sad myself.

    Big Smile

     

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    What he said

    Rick Strahl: What can you keep in your Head?

    +1

    Stick out tongue

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    What's for dinner?

    LOL, the best use yet for our awesome shared family calendar(s): the answer to the age-old question..

    "What's for dinner, Mom?"

    Tara created a new shared calendar called Menu and added "all-day" appointments (just because they are at top and bold like she wanted) that contains our evening meal! (Note: Tara likes to plan the week, shop once and cook every night - ymmv!)
     

     

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    The Ghost in the machine

    I was having loads of fun getting a "borrowed" web service running on the staging server yesterday.

    As with all code that you take without asking, there are always.. shall we say, "hiccups". Apparently every line in the web.config conflicted with the root web.config. And not in a nice way.

    Hack. Slash. Keyword/Value pairs flying everywhere in a mad frenzy.

    Then, it worked!  w00t!

    I clicked around the site checking it out, and then it stopped working.

    YSOD.

    Insufficient permission. ???

    I looked in IIS and there it was, no anonymous access to the web service folder. I was sure I'd set that. Oh well...

    Sure enough it starts working again. A few pages later..you guessed it!

    I check IIS. No anonymous access.

    Now, I'm thinking should I google this bizarre behavior?  It's almost like someone is on the server undoing my changes.

    Check the calendar - nope, not April 1st yet. (although now I have some great ideas guys Stick out tongue)

    Then I remember..I had put in a ticket to NetOps earlier in the day about this server. The ghost was Rick, in there changing permissions to investigate. We were basically fighting over the permissions without realizing. Embarrassed

    So, Rick, this morning I shall be fixing my permission problem again. Pleasedon'tundoitthankyouverymuch.

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    The grass is not greener

    I came across some great quotes this evening from a business forum I recently joined..think about them.

    When you complain..

    "80% of the people don't care about your problems, and the other 20% are glad you have them"

    Another.. 

    "People tend to overestimate what can be done in one year and underestimate what can be done in five years."

    But my favorite, one I think is quite profound..

    "The grass is not greener on the other side. The grass is greener wherever you water it most."


    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE!
    Few Google tips
    As I find them..
    1. Gmail: I've seen 20-30 good emails caught in spam, so check it often while you train it. Since I don't want to check the same message twice, I mark the spam as read whenever I check it.

      Then, to check just the unread spam you can search for in:spam is:unread. Here's a list of other neat search terms.

    2. Google Calendar: If like me you used the Month view, instead try the Custom view set to "Next 4 weeks". It's much better since you don't see all those "old weeks" and the days are bigger so you see more s+.



    3. Adding the US Holidays was easy. Add > Add a public calendar. Here you see the family calendar!


    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE!
    Graffiti CMS off to a great start

    The best ASP.NET CMS yet, our own Graffiti, is in the running for the asp.netPRO annual Readers Choice award.

    If you've played with it, you'll know why we're excited. Our old Dozing Dogs CMS came in second in it's first year in this event (2005) and with the amazing community response I've seen I'm convinced that Graffiti is going to do very well too.

    Every vote counts - please lend your support!

    And if you need a hint for best Web Hosting..
    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    Contains > IndexOf

    Newbie tip. This is good: 

    if (error.Contains("Declined"))..

    Not so much:

    if (error.IndexOf("Declined") != -1)..

    Guess which seems to be more common in code Stick out tongue 

    P.S. Yes, I have old code with examples of the latter. Doesn't count.

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    Oh, I forgot synching..

    To copy your personal calendar to google, use their new synch tool...

    ..and then uninstall it.

    It crashed my wife's Outlook 2003 almost every hour when it synched up, and I'm still finding strange entries in my Deleted Items folder in Outlook 2007 from when it was running - every hour it would create a few dozen empty appointments from 1979..

    If like me you decide just to move over, then it's no problem. Just let it synch once, and uninstall. But if you're trying to sit on the fence then be aware there are issues with this tool.

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE!

     

    Living in Gworld

    Dan asked me to post an update as I explore deeper into the Google forest. I'm now fully committed to Gmail and Google Calendar (why isn't it GCalendar?) and Outlook is now purely an evil tolerated for work purposes only.

    And with Rob Howard's tweet this morning about Google Apps for business, perhaps that's only temporary! Go Rob! (lol, while searching for Rob's blog URL, I found that he's already blogged it too)

    Gmail 

    Using Gmail is great - it's everywhere I am, unlike Outlook that tries hard but is never going to be as ubiquitous as a browser. I continue to love labels over folders, i don't miss the heirarchy simply because all mail is there, never deleted and SEARCH ROCKS. It turns out that I was filing things away in folders in Outlook really only so I could find them quickly. If finding them is super quick, that issue goes away.

    So labels rule. 

    Filters rock too - my aim is to keep everything out of my Inbox that isn't urgent. Therefore every time I get an email I think "is this important enough to interrupt me?" and if it isn't I create a filter to move it out of the Inbox and to a label. I can leave it unread or mark it read depending on if I ever *need* to read it. Some emails are just for filing, so I don't even see them. Perfect.

    Some I label, but leave in Inbox because they are something I want to deal with today.

    Regardless of the filter, the end result is the Archive button. I don't plan on deleting anything. Spam will delete itself. In fact I posted a suggestion to the Gmail team that they should replace the Delete button that is sitting in prime real-estate with a Mark as read button - something that I think is far more useful. I subscribe to a few mailing lists and want to mark as read all the time.

    I setup my Gmail as follows. I have two POP3 accounts that I want sucked into Gmail, so I went to Settings > Account > Add another mail account. I entered the POP3 login info and told Gmail to delete the email from the server (by unchecking the "leave a copy" box). That's it. Gmail sucks in my email in a clever way - if you get a lot of email from an account, it checks more often. Quiet accounts it checks less often.

    The only other trick I can pass on is the "Send mail as" option. I noticed that some mailing lists only accept mail from a specific email account (others don't seem to care). Plus I use a lot of email aliases (e.g. dell-at-shawthing.com I use with dell, but it's really just an alias for my real POP3 account). It's nice to reply to some people using the aliases they send to, so for my most popular aliases like @coveryourasp.com I set those up under "send mail as".

    Just click "Add another email address" and type in the email address. You have to verify it of course. I also check "Reply from the same address the message was sent to" so that most of the time people aren't even aware that I'm using Gmail. If you send to james@britishinside.com, that's who the reply comes from.

    Oh, and don't forget to click the Chat tab and move it below the labels. Smile

    Google Calendar

    I love the calendar too. I like weekends together so I set Monday as start of week.

    Setup is much easier - I created a gmail account for my wife too, so she uses calendar as well now. We share our calendars with full privileges ("Make changes AND manage sharing") so she can add to mine and vice versa. Our calendars are not public though. But I see hers and she seems mine - in pink and blue so it's easy to tell what's what.

    This morning Tara created more calendars on her account for our kids, and shared those too, so now I see calendars for the kids baseball, softball, teacher conferences, etc. I chose that sandy color for those. It's awesome. We all see everything at once and can search for events easily.

    Note that you won't need to invite each other to family events any more! Just put them on the calendar. if you invite your spouse you'll end up with two of them on there, in pink and blue. Wink

    Creating events is great too - it's so clever that you can just type "7pm Maisy softball at Alex field" and it picks out the time, description and location automatically. You can choose which calendar you are creating it on.

    Wow, I'm kinda pissed actually that this was out here and I was stuck in Outlook all this time. Guys, when you find stuff like this, tell me!

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE!
     

    System.Guid and SQL's uniqueidentifier

    This was interesting - I had a uniqueidentifier as an output parameter from a sproc and wanted to put it into a Guid.

    Guid guid = (Guid)sqlCmd.Parameters["@UserID"].Value;

    No. That throws System.InvalidCastException : Invalid cast from 'System.String' to 'System.Guid'.

    Ah, so it's a string, ok.

    Guid guid = new Guid((string)sqlCmd.Parameters["@UserID"].Value);

    Er, no. That throws System.InvalidCastException : Unable to cast object of type 'System.Guid' to type 'System.String'

    Excuse me?? Is it a string or a Guid?

    Well, apparently Guid's aren't your normal kind of bear. It's a class, it's a structure, it's a reference type depending on where you look. I couldn't be bothered to find the "real answer", but here's how I did the deed - kinda obvious NOW of course.

    Guid guid = new Guid(sqlCmd.Parameters["@UserID"].Value.ToString()); 

    The parameter value is a Guid type already you see, it's just that you cannot assign a Guid to a Guid. IMO that was a dumb first error message to show me ("can't cast string to Guid"), but all's well that ends well.

    ASP.NET 3.5 Web Hosting: 3 Months FREE + FREE Setup - CLICK HERE! 

    More Posts Next page »