Click here to Skip to main content
14,327,765 members

.NET Framework

 
QuestionGetting WebBrowser cookies for HttpWebRequest Pin
jjholt27-Feb-07 12:57
memberjjholt27-Feb-07 12:57 
QuestionDateTimePicker commercial replacements ? Pin
CAE27-Feb-07 12:20
memberCAE27-Feb-07 12:20 
QuestionPlease help me Pin
Glen Liu27-Feb-07 12:09
memberGlen Liu27-Feb-07 12:09 
GeneralWPF ActiveControl Equivalent Pin
Ed.Poore26-Feb-07 22:02
memberEd.Poore26-Feb-07 22:02 
QuestionMTOM taking more time than base64 method Pin
shahzadgodil26-Feb-07 19:26
membershahzadgodil26-Feb-07 19:26 
QuestionRemoting connection problem Pin
BobishKindaGuy26-Feb-07 13:41
memberBobishKindaGuy26-Feb-07 13:41 
Questionforce feedback game graphics - please help Pin
men0aphw25-Feb-07 23:10
membermen0aphw25-Feb-07 23:10 
QuestionHTTPS POST returning 100 Continue makes the WebClient throw protocol violation exception [modified] Pin
Corneliu Tusnea25-Feb-07 12:57
memberCorneliu Tusnea25-Feb-07 12:57 
Hi,

I use a WebClient to post some data to a server. (.Net 2.0) The server returns back:

HTTP/1.1 100 Continue
Server: Microsoft-IIS/5.0
Date: …

HTTP/1.1 200 OK
Server: Microsoft-IIS/5.0
Content-Type: text/xml;charset=ISO-8859-1
Content-Length: 929

This is valid as per the RFC:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec8.html[^]

As per the http specs this is a valid way of returning content and is generally used when the server requires more time to process and sends you a 100 Continue.

However from .Net I get the exception:

The server committed a protocol violation. Section=ResponseStatusLine

While processing the response. This seems to because the space in the headers is considered a possible security issue.

This is a bit of chicken and the egg. Header splitting is a security issue however 100 Continue + header splitting is valid as per the specs.
http://www.dotnet247.com/247reference/msgs/57/289086.aspx[^]

Now reading a bit more I found this nice comment on an MSDN blog:
http://blogs.msdn.com/david.wang/archive/2006/04/05/HTTP-SYS-IIS-and-the-100-continue.aspx[^]

Clients which advertise to be HTTP/1.1 compliant and then crash on "100 continue" are the real problem (they are not following public specifications)

The “fix” is to add a setting in the web config to disable the checking of split headers:
[...] httpWebRequest useUnsafeHeaderParsing="true" [...]

My problem is that Setting the flag in the config does not make any difference. Setting the flag using reflection does not help either. I still get the exception.

Setting the Enable100Continue property on the ServicePointManager or ServicePoint does not help either. I still get the exception.

Any help is welcome.

Thanks,
Corneliu.



-- modified at 19:17 Sunday 25th February, 2007

My.Team www.readify.net
My.Blog www.acorns.com.au
My.Tools Hawkeye - The .Net Runtime Object Editor - A developer's best tool.
My.Shop www.bestgames.com.au

QuestionStrongly named assemblies & 3rd-party COM/OCX Pin
Len Miller25-Feb-07 10:54
memberLen Miller25-Feb-07 10:54 
Questionintegrating visual studio.net 2003 or 2005 with autocad or 3d studio max Pin
mestkaniasa25-Feb-07 8:53
membermestkaniasa25-Feb-07 8:53 
Questionhelp on project biulding Pin
thesad25-Feb-07 3:17
memberthesad25-Feb-07 3:17 
AnswerRe: help on project biulding Pin
Colin Angus Mackay25-Feb-07 4:03
memberColin Angus Mackay25-Feb-07 4:03 
GeneralRe: help on project biulding Pin
thesad25-Feb-07 6:12
memberthesad25-Feb-07 6:12 
Question.NET Security Configuration Pin
Ian Uy24-Feb-07 16:17
memberIan Uy24-Feb-07 16:17 
AnswerRe: .NET Security Configuration Pin
Colin Angus Mackay25-Feb-07 4:02
memberColin Angus Mackay25-Feb-07 4:02 
QuestionGeneral question about object reference in .NET Framework Pin
Yanshof24-Feb-07 10:07
memberYanshof24-Feb-07 10:07 
AnswerRe: General question about object reference in .NET Framework Pin
Luc Pattyn24-Feb-07 10:59
professionalLuc Pattyn24-Feb-07 10:59 
GeneralRe: General question about object reference in .NET Framework Pin
Yanshof24-Feb-07 19:19
memberYanshof24-Feb-07 19:19 
GeneralRe: General question about object reference in .NET Framework Pin
Luc Pattyn24-Feb-07 23:20
professionalLuc Pattyn24-Feb-07 23:20 
QuestionXML inside WebBrowser control causes large delay when unloading the control Pin
Michael Wolski23-Feb-07 3:38
memberMichael Wolski23-Feb-07 3:38 
AnswerRe: XML inside WebBrowser control causes large delay when unloading the control Pin
Michael Wolski23-Feb-07 3:54
memberMichael Wolski23-Feb-07 3:54 
QuestionImplementing some broadcast udp protocol Pin
ohad_2923-Feb-07 3:31
memberohad_2923-Feb-07 3:31 
QuestionMailMessage.From vs. MailMessage.Sender in .NET 2.0 Pin
SindyatIndy22-Feb-07 6:29
memberSindyatIndy22-Feb-07 6:29 
AnswerRe: MailMessage.From vs. MailMessage.Sender in .NET 2.0 Pin
Scott Dorman22-Feb-07 18:02
professionalScott Dorman22-Feb-07 18:02 
AnswerRe: Which one is faster? Pin
Pete O'Hanlon21-Feb-07 23:05
protectorPete O'Hanlon21-Feb-07 23:05 

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.