开发者

System.Deployment.Application ApplicationDeployment with a Proxy in C#

I am using ClickOnce for a C# Windows Forms application, and want to allow people to update the software by clicking an Update button, which will check the server online to see if there are any updates. I am using the following method (not exact, but same principle):

ApplicationDeployment ad = ApplicationDeployment.CurrentDeployment;
ad.CheckForUpdateProgressChanged += new DeploymentProgressChangedEventHandler(ad_CheckForUpdateProgressChanged);
ad.CheckForUpdateCompleted += new CheckForUpdateCompletedEventHandler(ad_CheckForUpdateCompleted);
ad.CheckForUpdateAsync();

This all works fine, the problem is trying to run this code from behind a proxy. A 407 error: Proxy Authentication required occur开发者_Go百科s. I can't find anywhere in the ApplicationDeployment class to enter proxy settings, even though ad.CheckForUpdateAsync() simply does a webrequest to the server (I assume). Any ideas?

Thanks!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜