473,503 Members | 1,650 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 67625
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
6043
by: Lobang Trader | last post by:
Hi all, I am trying to create a username and a password class. I would like to know what are the RECOMMENDED minimum and maximum length for both fields? These fields will be something like...
2
18547
by: john brown | last post by:
There is a web page that I access frequently and would like to automate the authentication of the username and password. I would like to user a perl script but I'm not really sure about the steps....
14
8058
by: John Davis | last post by:
Anyone knows how to create the username/password authorization dialog in ASP? Thanks, John
1
4003
by: thoducng | last post by:
I am writing some code to access share folder on a remote network. DirectoryInfo dicInfo = new DirectoryInfo("remoteNetwork\shareFolder"); if (dicInfo.Exists) { //application code...
12
4110
by: Cecil | last post by:
Does this make sense for a logon table: CREATE TABLE Logon ( ID INT NOT NULL IDENTITY PRIMARY KEY, name VARCHAR(15) NOT NULL, password VARCHAR(15) NOT NULL ) GO CREATE UNIQUE INDEX...
0
1280
by: nemo | last post by:
I've included a list of username/password combinations in the Web.Config file and I've a simple aspx page with a username and password field for the users to log in. While the password field seems...
4
4703
by: nemo | last post by:
I've included a list of username/password combinations in the Web.Config file and I've a simple .aspx page with a username and password field for the users to log in. While the password field is...
1
2459
by: Grant Merwitz | last post by:
Is it possible to do an anonymous lookup in active directory through a web page? I am running a site with Domain Authentication activated. I am looking up a users email address in Active...
5
4129
by: livefreeordie | last post by:
Hi, I'm part of a 5-person team that develops websites for our company. I need to use the ftp_* functions to find some files on another file server. I need to authenticate to the file server...
0
7084
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3154
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1512
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
380
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.