How do I run a ClickOnce application with an application loaded from a browser?

What i want to do

When you click a download file link in our web application, the browser will prompt the user save

or the open

file. When selected, the open

file will be opened in the installed application.

What am I still

I have an ASP.NET MVC application that returns a file like this:

return File(bytes, "application/octet-stream", "file.rod");

      

I created a ClickOnce installer with a file association for an application and when requested for a save

file the file appears with a registered file association icon and when I double-clicked the application starts as expected.

However, when selected, the open

application does not start, which is strange because it starts correctly when the file is opened from the file system (explorer.exe). My real thinking is that the problem is how I set the file association or how I send data from the browser (content type perhaps?).

Here's the file association registered in the manifest file:

<fileAssociation xmlns="urn:schemas-microsoft-com:clickonce.v1"
    extension=".rod"
    description="Lollipops and Ice Cream"
    progid="Rod.Document"
    defaultIcon="risque.ico" />

      

What did I miss? What should I do next?

One more thing, I know it is possible to pass request parameters to the ClickOnce installer. This is what I also see as an attempt.

+3


source to share


1 answer


I think your content type should be application / x-ms-application on the Return () line; otherwise IE will not recognize that it needs to run it as an application. For Firefox, I haven't tried it in the most recent version, but I remember that the ClickOnce plugin worked correctly for it.



0


source







All Articles