By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,633 Members | 1,875 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,633 IT Pros & Developers. It's quick & easy.

WebClient with username + password

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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

P: n/a
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

P: n/a
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.