Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > ClickOnce Proxy Server Authentication
 

ClickOnce Proxy Server Authentication

 

I see from a previous post that it's not possible to use clickonce through a Proxy server (real shame guys ... come on, get a service release out that throws up a dialogue box like Media Player or the like have!)

http://forums.microsoft.com/msdn/showpost.aspx?postid=149938&siteid=1

What are the possible work arounds for this then, how can I deliver applications and their PreRequisits to people sitting behind firewalls which require authentication, best practices/tips/tricks etc appreciated.

Thanks,

Plip.

Phil Winstanley ASP.NET MVP  Monday, December 19, 2005 4:01 PM

Hi Phil,

I had this same problem this morning during an on-line client meeting and was taken by surprise.  I took two actions to get around this:

Added the following to machine.config on the client machine:

<system.net>
     <defaultProxy enabled="true" useDefaultCredentials="true"/>;
</system.net>

This change allow the ClickOnce install to at least begin but then I kept getting download errors after about 64K which suggested a corrupted file or inability to find the manifest in a portable executable but I was having no trouble installing to some other machines.

Finally, I just modified the Internet Explorer settings and then the install worked.

     Tools, Internet Options, Connections, LAN Settings, then

     Unchecked "Use a proxy server" which was the only item checked.

    Checked "Automatically detect settings" leaving nothing else checked.

I would also appreciate any illumination as to more viable workarounds or practices to follow when using ClickOnce.

Regards,

Chris

 
Christopher Smith  Tuesday, December 20, 2005 5:56 AM

Hi Chris,

Unfortinatly for me these options aren't viable, I need to get ClickOnce working with different Authentication to that which the user is logged in as (quite common on corporate networks).

I suppose I need to know, if I do an install for CD or some such and allow users to download this packaged up.

I've had a hunt through ApplicationDeployment and DeploymentManager with Reflector but it's not instantly obvious to me where the download of files is occuring.

I thought maybe it could be controlled programatically, but that reveals noting obvious ?

ApplicationDeployment deployment = ApplicationDeployment.CurrentDeployment;

if (deployment.CheckForUpdate())

{

deployment.Update();

MessageBox.Show("Update downloaded, application will now restart.");

Application.Restart();

}

else

{

MessageBox.Show("Your application is up to date.");

}

Phil Winstanley ASP.NET MVP  Tuesday, December 20, 2005 9:49 AM
Guys,

Still looking for some advice on deployment.... anyone have any suggestions?

Thanks,

Phil.
Phil Winstanley ASP.NET MVP  Wednesday, December 21, 2005 10:13 PM

Phil

The ClickOnce download engine only supports integrated (NTLM/Kerberos) server authentication (Basic, Digest not supported). ClickOnce cannot prompt for credentials itself so in general only the default user credentials can be used. The one exception to this is that if a user is prompted by Internet Explorer for auth credentials and the user elects to save the password then this is available to ClickOnce for the purposes of server authentication. Again only integrated auth is supported in this case.

So whether you use Application Deployment APIs or go through IE/Shell (click-ing the .application) you will have same problem. The download is done by System.net classes . Any request to download any ClickOnce application file need to have the credentials inetgrated already into the request.

I don't have an answer to your situation right now but I hope this explains the Current ClickOnce stance/design

-Thanks

Sreekanth

kanthb  Wednesday, December 21, 2005 11:17 PM

A hotfix has been issued for this problem:

http://support.microsoft.com/kb/917952/en-us

System.deployment.dll 2.0.50727.103

Unfortunately, FW3.0 still ships with 2.0.50727.42. :\

So what is the future of ClickOnce, if even in FW3 it cannot ask for proxy authentification?

sylde.net  Monday, December 11, 2006 10:34 AM

Ciao a tutti

mi scontro or ora anch'io con questo problema.

Reputo molto grave che la Microsoft non abbia provveduto, visto che è palesemente una pecca: un clickonce fatto nel modo attuale cosa serve visto che la magior parte delle aziende hanno un proxy server per andare su internet.

Vi chiedo comunque come avete risolto nel frattempo, visto che il thread è un po' datato; esiste un prodotto di terze parti?

Ciao

Alessandro

TSAlessandro  Tuesday, June 26, 2007 7:27 PM

...altra cosa.

Chi di voi ha provato l'hotfix.....andando sulla pagina di supporto sembra adirittura che si debba pagare...al limite vorrei io fare fattura su Microsoft, altro che!!!!

TSAlessandro  Tuesday, June 26, 2007 7:30 PM

esistono prodotti di terze parti che funzionino?

Ciao

Alessandro

TSAlessandro  Tuesday, June 26, 2007 7:32 PM
Anyone figure this out? My clickonce can't download the prereq exe files.
Joe Zen  Tuesday, June 03, 2008 8:39 PM

Any answer on this with the latest version? I am not prompted for credentials but get this error:

+ Downloading http://hqp-as-rtsdev11/clickoncetest/Protiviti.Test.ClickOnceTest.application did not succeed.
+ Unable to connect to the remote server
+ No connection could be made because the target machine actively refused it

Stewart Armbrecht  Friday, March 06, 2009 10:26 PM
I have an explanation for why it doesn't workworkaround which will handle ClickOnce updates on my blog. However this only handles updates, you will still need to get the ClickOnce app installed on the client machine first which could be done via CD or an initial install point inside the network.

http://bronumski.blogspot.com/2009/06/clickonce-updates-via-authentication.html

Bro Num
Bronumski  Thursday, July 23, 2009 11:23 AM

You can use google to search for other answers

Custom Search

More Threads

• Clickonce update problem
• How to deploy the same application twice to the same computer, each time using different configuration files?
• Install Software remotely
• Can Deployment Project Automatically increment build #?
• Create setup.exe by code
• Installer for more than one msi
• Setup project wants to install Visual Studio 2003
• Odd problem building setup project in VS2008
• Problem with creating Patches(urgnet)
• Shortcut to use the 'file type' icon