469,903 Members | 2,031 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,903 developers. It's quick & easy.

WebClient with username + password

Hi,
I'm trying to use WebClient class to upload data. In order to upload it, I
need to use my username and password. Does somebody know how can I set it in
the WebClient class?
Regards,
Ram.
Nov 16 '05 #1
3 64058
Hi Ram,

You could try setting the Credentials property of the WebClient.

WebClient webClient = new WebClient();
webClient.Credentials = new System.Net.NetworkCredential("UserName",
"Password", "Domain");

Regards,
Aravind C

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I'm trying to use WebClient class to upload data. In order to upload it, I
need to use my username and password. Does somebody know how can I set it in the WebClient class?
Regards,
Ram.

Nov 16 '05 #2
thanx!

"Aravind C" <ar***********@nospam.hotmail.com> wrote in message
news:ex*************@TK2MSFTNGP10.phx.gbl...
Hi Ram,

You could try setting the Credentials property of the WebClient.

WebClient webClient = new WebClient();
webClient.Credentials = new System.Net.NetworkCredential("UserName",
"Password", "Domain");

Regards,
Aravind C

"Ram Baruch" <ra*********@newsgroups.nospam> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
Hi,
I'm trying to use WebClient class to upload data. In order to upload it, I need to use my username and password. Does somebody know how can I set
it in
the WebClient class?
Regards,
Ram.


Nov 16 '05 #3
Thanks for Aravind 's informative suggestions.

Hi Ram,

Here are some reference on the WebClient.Credentials Property and
the System.Net.NetworkCredential class in MSDN:

#WebClient.Credentials Property
http://msdn.microsoft.com/library/en...NetWebClientCl
assCredentialsTopic.asp?frame=true

#NetworkCredential Class
http://msdn.microsoft.com/library/en...NetNetworkCred
entialClassTopic.asp?frame=true

Hope also helps.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 16 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Lobang Trader | last post: by
12 posts views Thread by Cecil | last post: by
reply views Thread by nemo | last post: by
4 posts views Thread by nemo | last post: by
1 post views Thread by Grant Merwitz | last post: by
5 posts views Thread by livefreeordie | last post: by
reply views Thread by Salome Sato | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.