Click here to Skip to main content
16,006,348 members
Home / Discussions / C#
   

C#

 
GeneralRe: escaping special characters... Pin
theJazzyBrain27-Feb-05 1:37
theJazzyBrain27-Feb-05 1:37 
GeneralRe: escaping special characters... Pin
Dave Kreskowiak27-Feb-05 3:12
mveDave Kreskowiak27-Feb-05 3:12 
GeneralRe: escaping special characters... Pin
theJazzyBrain27-Feb-05 11:26
theJazzyBrain27-Feb-05 11:26 
GeneralLan Messenger in C# Pin
naq26-Feb-05 8:29
naq26-Feb-05 8:29 
GeneralRe: Lan Messenger in C# Pin
Dave Kreskowiak26-Feb-05 9:35
mveDave Kreskowiak26-Feb-05 9:35 
GeneralRe: Lan Messenger in C# Pin
qnzone27-Feb-05 8:20
qnzone27-Feb-05 8:20 
GeneralShared Ressource? between main and thread for keeping track of status Pin
Shaitan0026-Feb-05 8:20
Shaitan0026-Feb-05 8:20 
GeneralHTTP protocol violation problem Pin
Small Rat26-Feb-05 6:59
Small Rat26-Feb-05 6:59 
Hi, everyone,

I have a question when I use the following code to get the response.
WebRequest req = WebRequest.Create(sURL);
try
{
WebResponse result = req.GetResponse();
}
catch(Exception){}

the code works very well on my XP, but when I run it under Windows server 2000, or some others PC, I sometimes get the exception:
The underlying connection was closed: The server committed an HTTP protocol violation.
it comes with the code GetResponse(). But when I use IE try the Url, IE works.

Would you please tell me why that is happened, and How to avoid/fix that, so I can read the response.

Thanks a lot in advance!!

Alan Shen,





Alan Shen

MCAD for .NET Version
^~^~^~^~^~^~^~^~^~^~^
Great idea is the beginging of success!
GeneralRe: HTTP protocol violation problem Pin
Radgar26-Feb-05 9:34
Radgar26-Feb-05 9:34 
QuestionHow to bypass proxy/firewall in .Net? Pin
Indian Ocean26-Feb-05 4:41
Indian Ocean26-Feb-05 4:41 
AnswerRe: How to bypass proxy/firewall in .Net? Pin
Colin Angus Mackay26-Feb-05 9:23
Colin Angus Mackay26-Feb-05 9:23 
GeneralPlease... Pin
KORCARI26-Feb-05 3:56
KORCARI26-Feb-05 3:56 
GeneralRe: Please... Pin
Dave Kreskowiak26-Feb-05 4:21
mveDave Kreskowiak26-Feb-05 4:21 
Questionhow do I... Pin
KORCARI26-Feb-05 3:22
KORCARI26-Feb-05 3:22 
AnswerRe: how do I... Pin
leppie26-Feb-05 3:24
leppie26-Feb-05 3:24 
AnswerRe: how do I... Pin
Alvaro Mendez26-Feb-05 7:06
Alvaro Mendez26-Feb-05 7:06 
Generalmessage speed Pin
Jugen26-Feb-05 3:11
Jugen26-Feb-05 3:11 
GeneralRe: message speed Pin
leppie26-Feb-05 3:29
leppie26-Feb-05 3:29 
GeneralRe: message speed Pin
Jugen27-Feb-05 5:18
Jugen27-Feb-05 5:18 
QuestionHow to do Popup Menu Pin
Mr.AMT26-Feb-05 2:41
Mr.AMT26-Feb-05 2:41 
AnswerRe: How to do Popup Menu Pin
MitchellBaldwin26-Feb-05 3:52
MitchellBaldwin26-Feb-05 3:52 
GeneralDatagrid + option to open word doc Pin
chandtec25-Feb-05 23:52
chandtec25-Feb-05 23:52 
GeneralRe: Datagrid + option to open word doc Pin
sreejith ss nair26-Feb-05 1:10
sreejith ss nair26-Feb-05 1:10 
GeneralRe: Datagrid + option to open word doc Pin
Anonymous26-Feb-05 23:49
Anonymous26-Feb-05 23:49 
GeneralRe: Datagrid + option to open word doc Pin
sreejith ss nair27-Feb-05 0:09
sreejith ss nair27-Feb-05 0:09 

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.