I have build an C# Winforms application which will need regular updates and patches in the future. To ease the update process for the users of my app I'd like to build an web-update class that looks for an update on my site.
What would be the most secure and reliable way to implement such a class, considering:
The site is build in PHP / Joomla
I haven't the foggiest idea how to program in PHP
All webserver directories are read-only by default (and only writeable by an FTP account I own)
The first and so far only idea that comes up to me is to create a file on my webserver that'll never be renamed, and in it I'll define the location of the latest version and number of it. The app will then be able to download the update from that path using the WebClient class.
However, if there's anyone with a better update-class idea that doesn't require an asp.net webserver nor webservices (already tried and failed on that one), I'll be grateful.
Edit:
I've tried the ClickOnce solution suggested by Gabriel McAdams, but on application startup I experience a "ClickOnce launch utility has stopped working" crash. So I'm again looking for a solution to update an application. For the moment, the answer of Kristian Damian is the most suitable.
I would look into ClickOnce Deployment.
Here is some of the text from that page:
ClickOnce deployment allows you to publish Windows-based applications to a Web server or network file share for simplified installation. Visual Studio provides full support for publishing and updating applications deployed with ClickOnce.
Maybe this link can help you:
http://themech.net/2008/05/adding-check-for-update-option-in-csharp/
I developed a Windows application in C# that does updates automatically over the Internet. After much grief, mainly because at that time I had very little experinece with Web development, I purchased a product that made it easy to update the application. If it is OK with StackOverFlow and you are interested, I can give you the URL.
Related
I have developed my application in c# which uses SQL Server Express as a database. I want to update my application through internet. What I want is to update only myapplication.exe
Because in the installed folder there is also application.config where configuration of that server is included such as Server name, Instance name. I do not want to touch this file. It is unique for every machine. Is there any ready mechanism or codes to do that? Please show me directions.
There is the Microsoft solution ClickOnce http://msdn.microsoft.com/en-us/library/t71a733d(v=vs.110).aspx
On the open source side, there is Omaha, from Google, powering Google Chrome, Google Earth etc. http://code.google.com/p/omaha/
Also, take a look at Shimmer, by the folks at Gihub https://github.com/github/Shimmer
Sounds like you need ClickOnce installation.
http://weblogs.asp.net/shahar/archive/2008/01/29/how-to-use-clickonce-to-deploy-your-applications.aspx
I have a simple console application written in .NET. I need to make an installer for the console application and put it in the server directory. This can be achieved by using the Setup Project in MS Visual Studio. I also want the ability that whenever I open the app it checks for a new version. If the new version exists then it installs it. Any recommendations on how to achieve this in .NET?
ClickOnce handles versioning for you. Simply publish new versions to the same place as previous versions, and when the user starts the app they will receive notice of the new version. That's part of the whole point of ClickOnce. The downside is, you lose control over the location of your application in the user's filesystem (for a simple console app like yours, that's probably not a huge deal, but I'll leave that decision to you). We've also had difficulty with certificates; if you sign your ClickOnce manifests (strongly recommended) you have to keep exactly the same certificate, strongly identifiable from a major CA, to keep the ClickOnce process strictly "click once".
Pretty much the only other way to handle versioning is to implement some web service that will report the most current version, and have your app call that service on startup to notify the user of upgrades. The upside is that your users still control where the app goes, and you can control where the app is published (if the next version needs to go on a different server, no problem; just point the user there using some information returned by the web service). The downside is more work for you to develop and deploy.
I would like to create a image file upload tool. The tool when started up and would ask the user what directory they would like to monitor and upload files from. In the background the tool would then post securely to a web service of some sort.
Constraints solution should work on Mac and Windows computers. I would like to make the upload process pretty automatic with little user intervention.
Basically the question I have is what would you use to create application that either runs in the background or foreground to basically continuously uploads files to a web server?
I have a couple of thoughts:
HTML5 using web workers (concerns accessing local files not sure the best way to do that)
Silverlight (my guess is I would have to sign the application)
Java web start application (Signing application)
Flash (scared of this idea)
I can do the Java web start application easy enough. Both HTML5 and Silverlight are things that I would like to know. I really don't care about flash at this point.
In Java, you can use the JNotify library: http://jnotify.sf.net . It works on Windows, OS X, and Linux.
I don't know about C# or HTML5. HTML5 (last I checked circa July 2011) doesn't have a filesystem API. In reality you need an app that can be distributed so it can run in the background, so Silverlight is out of the question. If I am misinterpreting your problem, please tell me.
I would try to go with a signed Java applet if you can foresee the need for downloading as well. It is difficult to find a good download solution other then a signed Java applet. A signed Java applet let's you push things to the users filesystem allowing for upload as well as download.
I published an application,when publishing it i checked that the application should check for updates-now how do i make it realy check for updates-where should i put the new files and in which format?
You'll need it on some kind of Web server.
I would imigine that you also want some authentication so that only the application it self can gain access to the new version of the software.
I'm going to assume you mean you are using CLickOnce as the installer. If you want the app to check for updates every time it is ran you need to publish to a location all the apps can see. If this is an internal app I believe a network share will do. If not then you need to publish to a web server or ftp server.
You can use ClickOnce as nportelli mentioned above, or you can use a 3rd party utility to do the heavy lifting for you.
I wrote an open-source library to do just that transparently - including an external update application to do the actual cold update. See http://www.code972.com/blog/2010/08/nappupdate-application-auto-update-framework-for-dotnet/
The code is at http://github.com/synhershko/NAppUpdate (Licensed under the Apache 2.0 license)
I've got an app that publishes and updates from an http update location (I publish to the ftp site of the host, and update from the website).
The publish.htm page is very handy as I can install the app on any machine, anywhere without needing media. The problem is, so can anyone else. How can I secure the update location so that only authorized users can install the app without buggering the auto-update feature of clickonce?
Is this an internal application? If so you could just exclude the publish.htm page from your deployment. Then to install you would then just use the application manifest link http://yoursite/YourApplication.application which should kick the install off, this would not affect automatic updates. This may be just enough obfuscation to for your purposes.
Failing that you can dynamically generate the application manifest using a little bit of asp.net which would only produce the manifest for the users you want. The other benefit this has is that you can isolate a small group of users when rolling out a new version.
Just a thought.
If you're still transferring over HTTP, it's as easy as running a traffic sniffing program like Wireshark to see where the application is downloading from. To evade this you'll need to make sure to transfer over HTTPS, on top of whatever obfuscation you do to hide the update location.