Label Cloud

Friday, March 30, 2007

Analyzing local webservices using Fiddler

Fiddler is a great tool for analyzing web traffic. it can be used to monitor, review and profile web sites as well as web services. The current realease version is great, but the version 2 Alpha is even better, since it allows interseption of HTTPS traffic.

I've used fiddler to profile our development and production website. It is also a great tool to monitor webserivce traffic. It will be able to show full incoming and outgoing message payloads. However, when debugging against localhost, Fiddler will not be able to intercept the traffic. There is a simple change that is required to be able to debug against localhost. Full description is at http://www.fiddlertool.com/Fiddler/help/hookup.asp - Section "Why don't I see IE7 or System.NET traffic sent to http://localhost or http://127.0.0.1?"

Here are the steps I used to be able to monitor smartclient application running against localhost (my development webserver is running on port 1652):

  • Start Fiddler v2
  • Select Rules -> Customize Rules...

  • Scroll down to OnBeforeRequest and add the override code if (oSession.host.ToUpper() == "SMARTAPP") { oSession.host = "127.0.0.1:1652" }

  • Point your application to SMARTAPP instead of pointing it to localhost:1652

That's all. Worked like a charm.


Share/Save/Bookmark

Thursday, March 29, 2007

Long distance travel - the Google way

How do you get from New York to Moscow? Google will show you the way.

Google will give you complete turn by turn directions including "Swim Across Atlantic Ocean". Check it out, it might be an interesting trip if you want to save on airfare.

Links:
Google Suggests You Swim Across The Atlantic Ocean
Screw air travel: Google suggests you get out and swim


Share/Save/Bookmark

Monday, March 26, 2007

New Sansa e260 + USB connectivity through a keyboard = almost system rebuild...

I just got myself a Sansa E260 MP3 player. A pretty good deal for $95 at Buy.Com after Google Checkout

Its a pretty nice device. Plays everything I need it to play - WMA, MP3, Video (after conversion - pretty annoying), Images (After conversion - again pretty annoying), Radio. The UI is OK. Reminds me of a mix between Windows Media Center and IPod. I think IPod is easier to navigate, but Sansa is still not bad at all. For $95, its a great little toy.

I connected it at home to me Vista laptop with no issues at all. Everything worked like charm. So I brought it to work and decided to copy the latest hanselminutes podcast to it. That's when the trouble started.

I have a media USB keyboard from Dell. Nothing special, a default keyboard that came with the system. It can (or rather should) act as a USB hub providing 2 extra USB plugs. I should mentioned, that I never used it as a hub before, and just assumed that it worked. I plugged the Sansa in, and ..... Nothing happened. Media player did not show the device. Running "Add hardware" wizard showed a nice little dialog: "you can install only one device at a time". Rebooting didn't help. Google search found a few articles about the error with almost all of them pointing to a specific registry - "Remove the key and reboot". Well.... Being adventurous - I do exactly what the posts suggest. After the reboot - I see a "Windows XP Setup" screen as the first window, Before any network logons, startup scripts, etc... After rebooting in safe mode, windows brings up an error message: "Setup can not run in safe mode" and reboots. The "Windows XP Setup screen" starts up again and system looks hung up, with only occasional HardDrive light. After 30 minutes or so, I decide that I might have to rebuild it - or at least repair from the DVD.

In another 30 minutes or so, the system finally starts up, and seems normal. However, the original problem is still not fixed. The Sansa still does not connect, the "Add new hardware" wizard still does not start up. So I decide to go back to basics. Crawl under my desk, and plug it into the back of the machine. Hooray, it works like a charm. The system recognized it within 10 seconds, brought up WMP, and showed it as the device.

So... Lessons learned:

  1. Minimize experiments unless you have spare machines or multiple harddrives. (I have both so I was able to work while my main system is down, and rebuild OS still keeps all my important files intact)
  2. KISS - Keep it simple. When you need to plug in the new device - don't use the USB keyboard as a hub if you never did it before. Go straight for the USB port you trust.
  3. DO NOT SCREW AROUND WITH REGISTRY. Especially based on forum posts unless you completely trust people who trust them


Share/Save/Bookmark

Friday, March 23, 2007

My.Yahoo Beta

Two days ago, I switched my home page to the new My.Yahoo Beta. Looks very promising. Here are some initial comments

  • The site definetely looks flashier. I like the improvement, but it took me a day to get used to it.
  • My original layout was in 3 columns, with the middle column being wider then the side columns. That layout is no longer available, since all columns are of the same width. That's a bit of an overkill for some feeds that are really narrow.
  • There is a pretty big square advertisement that you can't move. It used to be flat and wide, and I was able to visually ignore it, now it is distracting. It also moves the right column lower and not where I'd like it to be.

I didn't have any issues with performance. Overall impression is pretty good


Share/Save/Bookmark

Monday, March 19, 2007

Relocating the feed

I am changing the blog URL and the feed to the new URL. The new URL is: http://blog.tfanshteyn.com and the feed is located at:http://feeds.feedburner.com/tfanshteyn


Share/Save/Bookmark

Wednesday, March 14, 2007

Synchronize to Internet Time on Windows Vista

Here's an easy tip to keep your computer's time up to date.

Windows Vista will synchronize to Internet time clocks on regular intervals. To force the synchronization,

  • Right Click on the clock in your task bar and select "Adjust Date/Time"
  • Select "Internet Time" tab
  • Click on "Change settings...." button
  • Click "Update now" button

That's all.


Share/Save/Bookmark

Thursday, March 08, 2007

WinInet and WinHTTP HTTPS Sessions send empty Authentication header

This issue I've seen a while back, and had a pleasure of seeing again today.

HTTP uses Authentication: header to pass authentication information during authentication. The information can be easily decoded to retrieve UserId and password for Basic authentication. Authentication header is Base64 encoded and NOT encrypted. (That's a good reason for NOT using basic authentication without SSL). The handshake is as follows:

  1. Client submits a request without authentication header
  2. Server responds with 401 and a WWW-Authenticate header that specifies allowed authentication schemes
  3. Client resends the original request and provides Authentication header that includes authentication credentials.

Usual code on the server is -

If Not Authenticated

If Authentication header does not exists or empty,

return 401

Else

authorize

Decode Authenticated header to retrieve UserId for ......

What I've seen is that once the connection is established, the server considers the client authenticated, but the client (WinInet, WinHTTP, etc) might pass an empty authentication header. That means that if the code above will skip authentication, however, will not be able to retrieve the UserId. I wasn't able to find a lot of documentation on this, Actually only one good link: http://www1.tools.ietf.org/html/draft-johansson-http-gss-00. There are two ways that we were able to solve the problem. The easy way:

If Authentication header does not exists or empty,

return 401

Else

If Not Authenticated

authorize

Decode Authenticated header to retrieve UserId for ......

And the more complicated way:

If Not Authenticated

If Authentication header does not exists or empty,

return 401

Else

authorize

Store UserId in connection context

Use connection context to retrieve UserId for ......

Second solution is faster since it caches authentication and UserId. However, it is a more complicated solution.


Share/Save/Bookmark

Monday, March 05, 2007

Update to Smart Client Software Factory

Blaine Wastell is writing about a soon to come out April Update to Smart Client Software Factory. The new functionality is extremely interesting:

  • WPF Interoperability
  • Offline Application Block (this was released a while back, but I didn't see support for it recently)
  • WCF Support
  • Possible support for WWF (Windows Workflow). This is 2nd priority, but that means it might be released in the future updates, if not in the April update.


Share/Save/Bookmark

Thursday, March 01, 2007

What's up with IE File Download

I was downloading the VM of the new Orcas distribution from MSDN. The download comes in 8 650MB files that have to be downloaded separately. To speed things up, I started 2 downloads in IE and 2 in Firefox. All of them were started within a few seconds of each other and where going with the same speed. After about 45 minutes of waiting for the numbers to get to 100% and hoping to start downloading the rest of the files, I saw an important difference between IE and Firefox. After 100%, Firefox was DONE. IE Showed a dialog box saying that will take another 10 minutes to save the file to the destination. Huhh... What's up with extra 25% "saving tax"? How did IE benefit from saving a file to the temporary space before saving it to the final destination? Why did it have to use my C: drive when my destination was my, much larger, E: drive? I just don't get it.


Share/Save/Bookmark
Directory of Computers/Tech Blogs