Hello Peter,

You seem to be very experienced with these things so hopefully you can shed
some further light on this. In my case, the server requires a digital
certificate for access. I have installed that digital certificate on my
client, so when I try to access the resources (a folder) on the server using
IE, a small window pops-up telling me that the "Web site I want to view
requests identification". I am prompted to select a digital certificate and
upon selecting the one I installed I gain access to the remote folder.
Now, as you pointed out, the WebClient.DownloadFile method will not take me
to the UI where I need to select the digital certificate. I fact I don't
even need this step. I am trying to automate the daily download of a file
and there should be no human input in the process.
I guess I need to somehow indicate that I want to use the respective digital
certificate when I create the web session. Is there a way this can be
achieved with the WebClient class or I need to look at a different class /
approach?

Thanks,
Eddie


-----Original Message-----
From: Discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] Behalf Of Peter Ritchie
Sent: Wednesday, July 04, 2007 12:01 PM
To: ADVANCED-DOTNET@DISCUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] Accessing files over HTTPS


System.Net.WebClient has an UpdateFile and a DownloadFile method.  As long
as the server's cert is from a well-known Authority you shouldn't have a
problem with an https url.  If the cert isn't from a well-known Authority
and the Authority isn't in the Trusted Authorities list or the cert isn't
in the Trusted Publishers list you'll have to added in advance.  WebClient
has no UI, so it can't ask the user if the unknown cert is acceptable like
IE does, so it just fails.

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

===================================
This list is hosted by DevelopMentorĀ®  http://www.develop.com

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to