Click here to Skip to main content
15,881,898 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
QuestionGetting WebBrowser cookies for HttpWebRequest Pin
jjholt27-Feb-07 12:57
jjholt27-Feb-07 12:57 
QuestionDateTimePicker commercial replacements ? Pin
CAE27-Feb-07 12:20
CAE27-Feb-07 12:20 
QuestionPlease help me Pin
Glen Liu27-Feb-07 12:09
Glen Liu27-Feb-07 12:09 
GeneralWPF ActiveControl Equivalent Pin
Ed.Poore26-Feb-07 22:02
Ed.Poore26-Feb-07 22:02 
QuestionMTOM taking more time than base64 method Pin
shahzadgodil26-Feb-07 19:26
shahzadgodil26-Feb-07 19:26 
QuestionRemoting connection problem Pin
bobishkindaguy26-Feb-07 13:41
bobishkindaguy26-Feb-07 13:41 
Questionforce feedback game graphics - please help Pin
men0aphw25-Feb-07 23:10
men0aphw25-Feb-07 23:10 
QuestionHTTPS POST returning 100 Continue makes the WebClient throw protocol violation exception [modified] Pin
Corneliu Tusnea25-Feb-07 12:57
Corneliu 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
Len Miller25-Feb-07 10:54 
Questionintegrating visual studio.net 2003 or 2005 with autocad or 3d studio max Pin
mestkaniasa25-Feb-07 8:53
mestkaniasa25-Feb-07 8:53 
Questionhelp on project biulding Pin
thesad25-Feb-07 3:17
thesad25-Feb-07 3:17 
AnswerRe: help on project biulding Pin
Colin Angus Mackay25-Feb-07 4:03
Colin Angus Mackay25-Feb-07 4:03 
GeneralRe: help on project biulding Pin
thesad25-Feb-07 6:12
thesad25-Feb-07 6:12 
Question.NET Security Configuration Pin
Ian Uy24-Feb-07 16:17
Ian Uy24-Feb-07 16:17 
AnswerRe: .NET Security Configuration Pin
Colin Angus Mackay25-Feb-07 4:02
Colin Angus Mackay25-Feb-07 4:02 
QuestionGeneral question about object reference in .NET Framework Pin
Yanshof24-Feb-07 10:07
Yanshof24-Feb-07 10:07 
AnswerRe: General question about object reference in .NET Framework Pin
Luc Pattyn24-Feb-07 10:59
sitebuilderLuc Pattyn24-Feb-07 10:59 
GeneralRe: General question about object reference in .NET Framework Pin
Yanshof24-Feb-07 19:19
Yanshof24-Feb-07 19:19 
GeneralRe: General question about object reference in .NET Framework Pin
Luc Pattyn24-Feb-07 23:20
sitebuilderLuc Pattyn24-Feb-07 23:20 
QuestionXML inside WebBrowser control causes large delay when unloading the control Pin
Michael Wolski23-Feb-07 3:38
Michael Wolski23-Feb-07 3:38 
AnswerRe: XML inside WebBrowser control causes large delay when unloading the control Pin
Michael Wolski23-Feb-07 3:54
Michael Wolski23-Feb-07 3:54 
QuestionImplementing some broadcast udp protocol Pin
ohad_2923-Feb-07 3:31
ohad_2923-Feb-07 3:31 
QuestionMailMessage.From vs. MailMessage.Sender in .NET 2.0 Pin
SindyatIndy22-Feb-07 6:29
SindyatIndy22-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
mvePete 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.