Click here to Skip to main content
16,021,041 members
Home / Discussions / C#
   

C#

 
Questionconcurency violation delete command affected 0 records in acess database? Pin
subburaj.sabapathy15-Nov-06 0:28
subburaj.sabapathy15-Nov-06 0:28 
Questionaccessing the value of a textbox in another form Pin
shanisnathan15-Nov-06 0:24
shanisnathan15-Nov-06 0:24 
AnswerRe: accessing the value of a textbox in another form Pin
rah_sin15-Nov-06 0:34
professionalrah_sin15-Nov-06 0:34 
QuestionWhen to use Application Data Pin
nflrodrigues15-Nov-06 0:18
nflrodrigues15-Nov-06 0:18 
AnswerRe: When to use Application Data Pin
Anthony Mushrow15-Nov-06 0:56
professionalAnthony Mushrow15-Nov-06 0:56 
Questionhow to download file using https? Pin
Larisa_K15-Nov-06 0:06
Larisa_K15-Nov-06 0:06 
AnswerRe: how to download file using https? Pin
Ashish Derhgawen15-Nov-06 5:22
Ashish Derhgawen15-Nov-06 5:22 
AnswerRe: how to download file using https? Pin
Scott Dorman15-Nov-06 7:44
professionalScott Dorman15-Nov-06 7:44 
You can also check out http://www.codeproject.com/useritems/filedownloader.asp[^].

You almost have things setup correctly, but the CredentailCache.DefaultCredentials will supply the request object with the default system credentials, not the username and password required by the web site.

In order to do that, you will need to do something like this:
C#
Uri uri = new Uri(url);
CredentialCache credCache = new CredentialCache();
NetworkCredential userCred = new NetworkCredential(username, password, domain);
credCache.Add(uri, "Basic", userCred);
The "NTLM" in the call is a string that specifies the authentication type. The valid choices are "NTLM", "Digest", and "Basic". You will need to use the type that is appropriate for your specific case.

Also, make sure that you don't need a proxy to be specified.

-----------------------------
In just two days, tomorrow will be yesterday.

QuestionExecute a part of code in other context Pin
James Poulose15-Nov-06 0:05
James Poulose15-Nov-06 0:05 
QuestionXPaths to SOAP xmls Pin
James Poulose15-Nov-06 0:02
James Poulose15-Nov-06 0:02 
AnswerRe: XPaths to SOAP xmls Pin
Stefan Troschuetz15-Nov-06 0:07
Stefan Troschuetz15-Nov-06 0:07 
GeneralRe: XPaths to SOAP xmls Pin
James Poulose15-Nov-06 5:06
James Poulose15-Nov-06 5:06 
GeneralRe: XPaths to SOAP xmls Pin
Stefan Troschuetz15-Nov-06 5:36
Stefan Troschuetz15-Nov-06 5:36 
GeneralRe: XPaths to SOAP xmls Pin
James Poulose15-Nov-06 17:57
James Poulose15-Nov-06 17:57 
QuestionHow do you update an XML record? Pin
gowland037915-Nov-06 0:01
gowland037915-Nov-06 0:01 
Questionconverting from string array to int array Pin
karanba14-Nov-06 23:32
karanba14-Nov-06 23:32 
AnswerRe: converting from string array to int array Pin
rah_sin14-Nov-06 23:51
professionalrah_sin14-Nov-06 23:51 
AnswerRe: converting from string array to int array Pin
Guffa15-Nov-06 1:02
Guffa15-Nov-06 1:02 
GeneralRe: converting from string array to int array Pin
karanba15-Nov-06 4:03
karanba15-Nov-06 4:03 
QuestionNetwork cable status notification Pin
aamer malik14-Nov-06 23:21
aamer malik14-Nov-06 23:21 
AnswerRe: Network cable status notification Pin
Scott Dorman15-Nov-06 7:48
professionalScott Dorman15-Nov-06 7:48 
QuestionCreate Process With User Info Pin
Ferudun Atakan14-Nov-06 23:21
Ferudun Atakan14-Nov-06 23:21 
AnswerRe: Create Process With User Info Pin
Stefan Troschuetz15-Nov-06 0:03
Stefan Troschuetz15-Nov-06 0:03 
GeneralRe: Create Process With User Info Pin
Ferudun Atakan15-Nov-06 1:14
Ferudun Atakan15-Nov-06 1:14 
GeneralRe: Create Process With User Info Pin
Stefan Troschuetz15-Nov-06 1:26
Stefan Troschuetz15-Nov-06 1:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.