Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

C# Deploying my application - clickonce from web only

So I have developed my application in C#. I am ready to deploy it. I want to make it so that users always launch it from my website (so that they always get updates, no install, etc.).

Is ClickOnce the proper way to do this?

I tried deploying ClickOnce to my server and a few things jump out at me:

1) The user is given the option to run a setup or launch the .application file - what's the difference? Can't it detect this on it's own?

2) When I try to "launch" the .application it asks to download it to my computer. Anyway to just launch the file straight from the browser?

3) After I download and run the .application file I get an error with the following message: "Deployment and application do not have matching security zones."

like image 626
Andy Hin Avatar asked Aug 04 '10 17:08

Andy Hin


People also ask

What C is used for?

C programming language is a machine-independent programming language that is mainly used to create many types of applications and operating systems such as Windows, and other complicated programs such as the Oracle database, Git, Python interpreter, and games and is considered a programming foundation in the process of ...

What is the full name of C?

In the real sense it has no meaning or full form. It was developed by Dennis Ritchie and Ken Thompson at AT&T bell Lab. First, they used to call it as B language then later they made some improvement into it and renamed it as C and its superscript as C++ which was invented by Dr.

Is C language easy?

C is a general-purpose language that most programmers learn before moving on to more complex languages. From Unix and Windows to Tic Tac Toe and Photoshop, several of the most commonly used applications today have been built on C. It is easy to learn because: A simple syntax with only 32 keywords.

Is C programming hard?

C is more difficult to learn than JavaScript, but it's a valuable skill to have because most programming languages are actually implemented in C. This is because C is a “machine-level” language. So learning it will teach you how a computer works and will actually make learning new languages in the future easier.


1 Answers

Yes, ClickOnce suits your needs perfectly.

  1. The setup.exe, or "bootstrapper" as it's called, is used to install prerequisites such as the .NET Framework and Microsoft Installer, since it is the .NET framework that contains the ClickOnce runtime, which is needed to install your application. The bootstrapper needs to be used only once and only on computers that don't have those prerequisites, after that only the .application file, called the "deployment manifest", is used for updates. When you publish using ClickOnce, a Publish.htm file is created, which contains some JavaScript code that detects if the user has the prerequisites installed. If the user doesn't, it presents a button that links to setup.exe, otherwise it present a button which links directly to the .application file. You can use that page (or create one based on it) to give the shortest possible installation experience for your users.

  2. Either the .NET Framework is not installed on the client's computer (in this case, use the bootstrapper), or your web server is not configured properly, and so does not associate the .application extension with the MIME type of application/x-ms-application. Create that association to solve the issue. I also recommend adding some http headers to disable the cache on the deployment manifest, otherwise the user's browser can cache it and it could lead to the user missing updates.

  3. You cannot download and run the deployment manifest file locally for a ClickOnce installation that was published to a web location, since ClickOnce gives a higher trust level to local installation (such as from the local computer or a network share), but the application manifest points to an installation source on the web, which has a lower trust level, and thus fails. Once you solve issue 2, this issue will also be resolved.

like image 181
Allon Guralnek Avatar answered Oct 19 '22 12:10

Allon Guralnek