Click here to Skip to main content
15,889,116 members
Home / Discussions / C#
   

C#

 
AnswerRe: create DTS dynamically using C# (urgent) Pin
J4amieC2-May-06 0:59
J4amieC2-May-06 0:59 
GeneralRe: create DTS dynamically using C# (urgent) Pin
AmitSumit2-May-06 2:00
AmitSumit2-May-06 2:00 
QuestionConsole program Pin
DH Julio2-May-06 0:01
DH Julio2-May-06 0:01 
AnswerRe: Console program Pin
stancrm2-May-06 0:28
stancrm2-May-06 0:28 
GeneralRe: Console program Pin
DH Julio2-May-06 5:06
DH Julio2-May-06 5:06 
AnswerRe: Console program Pin
V.2-May-06 2:32
professionalV.2-May-06 2:32 
QuestionCOM Interop question Pin
GDavy1-May-06 23:33
GDavy1-May-06 23:33 
QuestionQuestion about proxy in webrequest (!!Help!!) Pin
stancrm1-May-06 23:00
stancrm1-May-06 23:00 
I'm trying to access a web address using proxy (Microsoft ISA Server).
The authentication is NTLM (using domain in Windows 2000).

My code is :
try
{
	const string proxyHostAndPort = "http://myproxy:8080";

	WebProxy webProxy = new WebProxy(proxyHostAndPort, true);
	webProxy.Credentials = CredentialCache.DefaultCredentials;

	WebRequest webRequest = WebRequest.Create("http://www.microsoft.com");
	webRequest.Credentials = CredentialCache.DefaultCredentials;
	webRequest.Proxy = webProxy;

	WebResponse webResponse = webRequest.GetResponse();
	Stream stream = webResponse.GetResponseStream();

	byte[] receivedDataInBytes = new byte[webResponse.ContentLength];
	stream.Read(receivedDataInBytes, 0, receivedDataInBytes.Length);
	string receivedDataInString = Encoding.ASCII.GetString(receivedDataInBytes);

	Trace.WriteLine(receivedDataInString);
}
catch (Exception ex)
{
	Console.WriteLine(ex.ToString());
}


But I get an error (407 - Proxy authentication needed). Are there something wrong in my code ?
Thanks.
QuestionCan i disabled the entries in ComboBox in window application Pin
ankushmn1-May-06 22:32
ankushmn1-May-06 22:32 
AnswerRe: Can i disabled the entries in ComboBox in window application Pin
microsoc1-May-06 23:29
microsoc1-May-06 23:29 
Questiondll Pin
TAREQ F ABUZUHRI1-May-06 21:46
TAREQ F ABUZUHRI1-May-06 21:46 
Question.Net 1.1 to .Net 2.0 Pin
TAREQ F ABUZUHRI1-May-06 21:43
TAREQ F ABUZUHRI1-May-06 21:43 
AnswerRe: .Net 1.1 to .Net 2.0 Pin
WillemM1-May-06 22:20
WillemM1-May-06 22:20 
QuestionInt to string Pin
Rmokkenstorm1-May-06 21:35
Rmokkenstorm1-May-06 21:35 
AnswerRe: Int to string Pin
WillemM1-May-06 22:21
WillemM1-May-06 22:21 
GeneralRe: Int to string Pin
Rmokkenstorm1-May-06 22:25
Rmokkenstorm1-May-06 22:25 
AnswerRe: Int to string Pin
J4amieC1-May-06 23:22
J4amieC1-May-06 23:22 
AnswerRe: Int to string Pin
Guffa1-May-06 23:25
Guffa1-May-06 23:25 
GeneralRe: Int to string Pin
Rmokkenstorm1-May-06 23:38
Rmokkenstorm1-May-06 23:38 
AnswerRe: Int to string Pin
Josh Smith2-May-06 1:43
Josh Smith2-May-06 1:43 
GeneralRe: Int to string Pin
Rmokkenstorm2-May-06 2:43
Rmokkenstorm2-May-06 2:43 
GeneralRe: Int to string Pin
Josh Smith2-May-06 4:21
Josh Smith2-May-06 4:21 
GeneralRe: Int to string Pin
Rmokkenstorm2-May-06 4:34
Rmokkenstorm2-May-06 4:34 
Questionassigning Values to a resized string Array Pin
abhinish1-May-06 20:50
abhinish1-May-06 20:50 
AnswerRe: assigning Values to a resized string Array Pin
akyriako781-May-06 21:01
akyriako781-May-06 21:01 

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.