I want to develop a webapp using ASP.NET but it have to use some client-side functionality provided by desktop application also developed by me.
Existing example: in Picasa Web Album you can click a link called "Download to Picasa" which opens 开发者_如何学PythonPicasa desktop application and downloads album.
I suppose it require different approaches on different platforms. What are the possibilities to make it work on both Windows and Mac OS X?
Register a custom URL Protocol Handler. Look here: https://stackoverflow.com/a/2429803/449906
I don't know Picasa in detail, but your case sounds like, you start a download by clicking the link "download to picasa". This download will start a link like this:
picasa:///downloadfeed/?uname=ASDFASDFASDF .....
According to your OS any protocol may be associated with a different external program. For information on this you may have a look at the mozilla board .
REGEDIT4
[HKEY_CLASSES_ROOT\foo]
@="URL:foo Protocol"
"URL Protocol"=""
[HKEY_CLASSES_ROOT\foo\shell]
[HKEY_CLASSES_ROOT\foo\shell\open]
[HKEY_CLASSES_ROOT\foo\shell\open\command]
@="\"C:\\Program Files\\Application\\program.exe\" \"%1\""
If you start such a link, your external programm will start and do what ever you want.
hth
精彩评论