Handle secure connections and network requirements:
- FTP: Use the alternative
Start method to provide NetworkCredential for FTP XML URLs and downloads. - Basic Auth: Use
BasicAuthentication objects to set credentials for BasicAuthXML, BasicAuthDownload, and BasicAuthChangeLog. - User-Agent: Set
AutoUpdater.HttpUserAgent to identify your requests in server logs. - Proxy: Configure
AutoUpdater.Proxy using a WebProxy object. Note: Changelog URLs are not supported when using a Proxy.
// FTP usage
AutoUpdater.Start("ftp://rbsoft.org/updates/AutoUpdaterTest.xml", new NetworkCredential("FtpUserName", "FtpPassword"));
// Basic Authentication
BasicAuthentication basicAuthentication = new BasicAuthentication("myUserName", "myPassword");
AutoUpdater.BasicAuthXML = AutoUpdater.BasicAuthDownload = AutoUpdater.BasicAuthChangeLog = basicAuthentication;
// Proxy Server
var proxy = new WebProxy("ProxyIP:ProxyPort", true)
{
Credentials = new NetworkCredential("ProxyUserName", "ProxyPassword")
};
AutoUpdater.Proxy = proxy;