Category Archives: ClickOnce

ClickOnce and file association issues

I was trying to setup .sql file association working for our lightweight SQL editor, but it took me more time than expected. Below are steps that I applied to make it work:

  • Configure the file association
  • Make sure at least .NET Framework 3.5 is used
  • Activate ClickOnce Full Trust
  • Read arguments using activation data
  • Make sure no app is associated with the extension you want to use!

The last step was probably the biggest problem from the start, so I am not sure all of the other steps are required. I enabled ClickOnce logging and found out there is a warning regarding the extension.

File association for ".sql" skipped, since another application is using it.

I had to remove association information from registry (HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.sql) and restart!

Hosting ClickOnce application on Amazon S3

When hosting ClickOnce applications on Amazon S3 you might notice download problems on some versions of Internet Explorer. Although other browsers does not have problems downloading ClickOnce .application file, Internet Explorer complains with “The requested site is either unavailable or cannot be found.”.

The problem is most probably in the Content-Type of the .application file. It is set to application/binary, but should be application/x-ms-application. To fix it, you have to connect to S3 Management Console and fix the Content-Type under file Properties.