views:

94

answers:

1

Hi,

I have a clickonce application (VS2010, .NET 4). I have registered a file association (.task), and this all works well. If I double click a file with the .task extension on the desktop the clickonce application opens and can open the file.

If I email the file however, and double click the file from within outlook, I get the open/save dialog. If I click open nothing appears to happen. If I save the file I can open it by double clicking on it.

Any ideas why the file does not open from within outlook ?

Thanks, Mark

A: 

ClickOnce applications run with no administrative privileges. The file types that you define in the deployment are not known to other applications. I'm guessing Outlook uses the same download mechanism as IE (if not the one in IE) and it just doesn't have that information available to it.

RobinDotNet
Thanks for the response. I tried putting the file on a web server and browsing to it in ie, and the clickonce app launches and opens the file, which I was pleased about. It appears the OS knows about the file association. Perhaps outlook has some special handling ? The files can also be opened from the file system from explorer, so it does appear that other apps know about thee file association. There must be some peculiarity with outlook.
MarkGr
If you put the file on a webserver and in IE point to the file (don't browse, just use a URL), and clck Run instead of Save, does it work? Most people report that it doesn't work unless they save it to disk and THEN open it.
RobinDotNet
Ah, apologies. I browsed to the file from the server, so I got full trust. I get the same behaviour as outlook when I browse from other computers in the intranet zone. Thanks Robin this demystifies it.
MarkGr
I'm experiencing a similar issue with a VS2008 .Net 3.5 click-once app. However, in my case, I can open the attachment from outlook on WinXP, but not Win7. Are there any known workarounds?
JSR
This must be a security issue; they significantly beefed up the security around internet access (and everything else) in Windows Vista and Windows 7. Just curious -- what does it actually do when you try to double-click on it on Windwos 7?
RobinDotNet
When I dbl-click the Outlook attachment on WinXP, the clickonce app is launched and performs an action specified by the attachment. When I try the same on Win7, Outlook displays the "Opening Mail Attachment" dialog, but does not launch the clickonce app. I don't know if this is relevant or not, but I noted that on WinXP, the attachment displays the clickonce app's icon, but a generic icon is displayed on Win7.
JSR
RobinDotNetI've created a new SO question, please see http://stackoverflow.com/questions/3009465/file-association-outlook-attachment-issue
JSR