views:

46

answers:

1

This question addresses how to register a custom URL protocol to launch an application in response to a link, but I want my handler to serve dynamic content.

Essentially, I'm looking to create a web application that runs on the user's machine instead of a web server. I could set up a localhost, but I want to use a "friendly" URL format that the user can reference elsewhere, e.g. a hypothetical cats protocol:

cats:fluffy/cheeseburger-consumption-stats

How can I accomplish this? Also, do you see any pitfalls with this approach, such as security warnings from browsers?

Thanks!

+3  A: 

I did something similar a few years back, we had a local application and wrote a custom url handler so that we could embed these special links on our web page that when clicked would launch our application and load the file.

The technology is called Asynchronous Pluggable Protocols - http://msdn.microsoft.com/en-us/library/aa767916(v=VS.85).aspx

Here is a quick example explaining the registry settings you need to make and a sample app that handles requests - http://msdn.microsoft.com/en-us/library/aa767914(VS.85).aspx

Sijin