C# Deploying my application - clickonce from web only

喜欢而已 提交于 2019-11-30 13:57:07

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.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!