Click here to Skip to main content
15,844,752 members
Home / Discussions / C#
   

C#

 
GeneralRe: Assembly Pin
Daniel Turini2-Nov-02 9:04
Daniel Turini2-Nov-02 9:04 
GeneralRe: Assembly Pin
kavehdr2-Nov-02 9:13
kavehdr2-Nov-02 9:13 
GeneralRe: Assembly Pin
John Fisher2-Nov-02 10:22
John Fisher2-Nov-02 10:22 
GeneralRe: Assembly Pin
ian mariano2-Nov-02 10:59
ian mariano2-Nov-02 10:59 
GeneralRe: Assembly Pin
kavehdr2-Nov-02 12:32
kavehdr2-Nov-02 12:32 
GeneralRe: Assembly Pin
John Fisher2-Nov-02 14:29
John Fisher2-Nov-02 14:29 
GeneralRe: Assembly Pin
ian mariano2-Nov-02 15:17
ian mariano2-Nov-02 15:17 
GeneralHttpWebRequest Pin
kavehdr2-Nov-02 8:45
kavehdr2-Nov-02 8: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 9:39
Stephane Rodriguez.2-Nov-02 9:39 
GeneralComponent.Site Pin
Pete Bassett2-Nov-02 8:30
Pete Bassett2-Nov-02 8:30 
GeneralRe: Component.Site Pin
ian mariano2-Nov-02 8:39
ian mariano2-Nov-02 8:39 
GeneralRe: Component.Site Pin
Pete Bassett2-Nov-02 12:15
Pete Bassett2-Nov-02 12:15 
GeneralRe: Component.Site Pin
Stephane Rodriguez.2-Nov-02 20:00
Stephane Rodriguez.2-Nov-02 20:00 
GeneralRe: Component.Site Pin
Pete Bassett2-Nov-02 23:37
Pete Bassett2-Nov-02 23:37 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 2:10
Pete Bassett3-Nov-02 2:10 
GeneralRe: Component.Site Pin
Stephane Rodriguez.3-Nov-02 2:57
Stephane Rodriguez.3-Nov-02 2:57 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 3:41
Pete Bassett3-Nov-02 3:41 
GeneralRe: Component.Site Pin
leppie3-Nov-02 4:25
leppie3-Nov-02 4:25 
GeneralRe: Component.Site Pin
Stephane Rodriguez.3-Nov-02 4:46
Stephane Rodriguez.3-Nov-02 4:46 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 8:52
Pete Bassett3-Nov-02 8:52 
GeneralRe: Component.Site Pin
ian mariano3-Nov-02 9:07
ian mariano3-Nov-02 9:07 
GeneralRe: Component.Site Pin
Pete Bassett3-Nov-02 23:19
Pete Bassett3-Nov-02 23:19 
QuestionWhen has the context menu disappeared? Pin
Nnamdi Onyeyiri2-Nov-02 3:22
Nnamdi Onyeyiri2-Nov-02 3:22 
AnswerRe: When has the context menu disappeared? Pin
Stephane Rodriguez.2-Nov-02 4:47
Stephane Rodriguez.2-Nov-02 4:47 
GeneralRe: When has the context menu disappeared? Pin
Nnamdi Onyeyiri2-Nov-02 9:06
Nnamdi Onyeyiri2-Nov-02 9: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.