Wireshark Rocks

I love Wire­shark. It’s a net­work pro­to­col ana­lyzer that has saved me count­less hours over the last year or so in debug­ging seri­al­iza­tion and HTTP issues on a vari­ety of projects. Today’s suc­cess story comes cour­tesy of Sil­verlight, WCF and the haz­ards of leav­ing slashes off the end of a URL.

I’m work­ing on a project devel­op­ing a Sil­verlight app and I’m in the process of adding a log­ging ser­vice on the server side. After I added the frame­work and skele­ton yes­ter­day to imple­ment log­ging, my Sil­verlight app started throw­ing up a “This web page is being redi­rected to a new loca­tion. Would you like to resend the form data you have typed to the new loca­tion?” infor­ma­tional mes­sage. This was late in the day yes­ter­day and hav­ing zero brain cells left to fig­ure it out, I left it for today, hop­ing it would mag­i­cally go away.

Of course, it didn’t. But hav­ing reju­ve­nated the two brain cells I have with two gin and ton­ics last night, this morn­ing it was clear that Wire­shark would be the answer. Instead of spend­ing hours try­ing to fig­ure out why in the hell I was get­ting that mes­sage, I just fired Wire­shark up and fol­lowed the TCP stream going back and forth from my app to the server. That told me that the server was return­ing a 301 Tem­po­rary Redi­rect because there was no end­point at “http://my_url/without_an_endingslash” but that there was an end­point lis­ten­ing at “http://my_url/without_an_endingslash/” and so I was being redi­rected there.

2 min­utes using a great tool and I had the answer. I love days like this, rare though they are.

No Comments

Leave a Reply

Your email is never shared.Required fields are marked *