Click here to Skip to main content
15,888,351 members
Home / Discussions / C#
   

C#

 
GeneralRe: Assembly Pin
Daniel Turini2-Nov-02 8:04
Daniel Turini2-Nov-02 8:04 
GeneralRe: Assembly Pin
kavehdr2-Nov-02 8:13
kavehdr2-Nov-02 8:13 
GeneralRe: Assembly Pin
John Fisher2-Nov-02 9:22
John Fisher2-Nov-02 9:22 
GeneralRe: Assembly Pin
ian mariano2-Nov-02 9:59
ian mariano2-Nov-02 9:59 
GeneralRe: Assembly Pin
kavehdr2-Nov-02 11:32
kavehdr2-Nov-02 11:32 
GeneralRe: Assembly Pin
John Fisher2-Nov-02 13:29
John Fisher2-Nov-02 13:29 
GeneralRe: Assembly Pin
ian mariano2-Nov-02 14:17
ian mariano2-Nov-02 14:17 
GeneralHttpWebRequest Pin
kavehdr2-Nov-02 7:45
kavehdr2-Nov-02 7:45 
Can anyone figure out why the following code always throws an exception from the site, that the password is incorrect(401) even though when it is correct!

using System;
using System.Net;

class website
{

public static void Main(string[] args)
{
if (args.Length != 3)
{
Console.WriteLine("usage: p25 \"URL\" \"username\" \"password\"");
return;
}

WebRequest request;
WebResponse response;

try{request = WebRequest.Create(args[0]);}
catch
{
Console.WriteLine("The Url provided is not a valid Url");
return;
}

request.Credentials = new NetworkCredential(args[1], args[2]);
try{response = request.GetResponse();}
catch(WebException e)
{
Console.WriteLine("The following error occured while accessing the resources:\n"
+ e.Message);
return;
}

}

}

K.D.
GeneralRe: HttpWebRequest Pin
Stephane Rodriguez.2-Nov-02 8:39
Stephane Rodriguez.2-Nov-02 8:39 
GeneralComponent.Site Pin
Pete Bassett2-Nov-02 7:30
Pete Bassett2-Nov-02 7:30 
GeneralRe: Component.Site Pin
ian mariano2-Nov-02 7:39
ian mariano2-Nov-02 7:39 
GeneralRe: Component.Site Pin
Pete Bassett2-Nov-02 11:15
Pete Bassett2-Nov-02 11:15 
GeneralRe: Component.Site Pin
Stephane Rodriguez.2-Nov-02 19:00
Stephane Rodriguez.2-Nov-02 19:00 
GeneralRe: Component.Site Pin
Pete Bassett2-Nov-02 22:37
Pete Bassett2-Nov-02 22:37 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 1:10
Pete Bassett3-Nov-02 1:10 
GeneralRe: Component.Site Pin
Stephane Rodriguez.3-Nov-02 1:57
Stephane Rodriguez.3-Nov-02 1:57 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 2:41
Pete Bassett3-Nov-02 2:41 
GeneralRe: Component.Site Pin
leppie3-Nov-02 3:25
leppie3-Nov-02 3:25 
GeneralRe: Component.Site Pin
Stephane Rodriguez.3-Nov-02 3:46
Stephane Rodriguez.3-Nov-02 3:46 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 7:52
Pete Bassett3-Nov-02 7:52 
GeneralRe: Component.Site Pin
ian mariano3-Nov-02 8:07
ian mariano3-Nov-02 8:07 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 22:19
Pete Bassett3-Nov-02 22:19 
QuestionWhen has the context menu disappeared? Pin
Nnamdi Onyeyiri2-Nov-02 2:22
Nnamdi Onyeyiri2-Nov-02 2:22 
AnswerRe: When has the context menu disappeared? Pin
Stephane Rodriguez.2-Nov-02 3:47
Stephane Rodriguez.2-Nov-02 3:47 
GeneralRe: When has the context menu disappeared? Pin
Nnamdi Onyeyiri2-Nov-02 8:06
Nnamdi Onyeyiri2-Nov-02 8:06 

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.