Search:
Namespaces
Discussions
.NET v1.1
Feedback
dotnet 1.1 SP1 - HttpWebRequest - Protocol Violation
Messages
Related Types
This message was discovered on
microsoft.public.dotnet.framework
.
Responses highlighted in red are from those people who are likely to be able to contribute good, authoratitive information to this discussion. They include Microsoft employees, MVP's and others who IMHO contribute well to these kinds of discussions.
Post a new message to this list...
cguthri mc (VIP)
Hello, I have a client-server application I have developed that has been
working fine for over a year, but after any of my customers install the SP1
the product no longer works. I installed the SP1 on one of my test machines
and found that the program was breaking down when ever it tried to recieve a
response from a server. The
HttpWebRequest
object was failing upon invoking
the GetResponse command, stating that there was a protocol violation. What
was changed that stops this from working and what can I do to get it to work
again? My program is in VB.NET and simply posts ascii information to an ASP
page which response.writes a simple ascii string back.
Reply to this message...
cguthri mc (VIP)
Please if anyone has any information about this let me know. I have sniffed
the packets and seen the information is indeed being sent and comes back just
like normal, it is just that .NET seem incapable of recognizing a normal page
response like it used to be able to do. All test machines and customers who
did not install the 1.1 SDK can use my product with no problems. Here is the
code I use:
Dim strResult As String
strResult = "FAILED"
Dim URL As String = strURL
Dim objUri As New Uri(URL)
Dim request As
HttpWebRequest
=
WebRequest
.Create(objUri)
request.Method = "POST"
Dim d As Byte() = System.Text.
Encoding
.UTF8.GetBytes(strContents)
request.ContentLength = d.Length
request.Timeout = 400000
Dim newStream As Stream = request.GetRequestStream()
newStream.Write(d, 0, d.Length)
newStream.Close()
Dim response As
HttpWebResponse
= request.GetResponse()
Dim reader As
StreamReader
= New
StreamReader
(response.GetResponseStream(), True)
strResult = reader.ReadToEnd
Return strResult
Reply to this message...
cguthri mc (VIP)
*correction - All test machines and customers who
did not install the 1.1 SDK *SP1* can use my product with no problems.
Reply to this message...
Feroze [msft] (VIP)
Can you show a sniff of the server response, to see what it looks like ?
feroze
================
this posting is provided as-is.
"cguthri_mc" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
cguthri mc (VIP)
Yes, and it looks the same as ever, as per my earlier repsonse. Also in that
response I noted that those who have not upgraded to SP1 for .NET 1.1 can use
my program just fine. Something in .NET 1.1 is handling things differently,
and it seems to deal with the
HttpWebRequest
object, and moreover
specifically, the GetResponse method.
"Feroze [msft]" wrote:
[Original message clipped]
Reply to this message...
cguthri mc (VIP)
I've done some more investigating of the packets and have found some things
of interest. I sniffed the packets on two of my test machines, which both
shared the some connection on the same swtich.
The one with the SP1 had far more "chatter" between intself and the server
than the one without the SP1. These are extra TCP sends on the SP1 machine
than the other.
The window size is far smaller on the SP1 machine than the other,a dn by
window I do not mean GUI, I mean the packet windows.
The SP1 machine eventually runs out of buffer space and gets a TCP ZERO
WINDOW.
Something is definetely different with SP1, are there some defaults that
have been changed? Is this a bug?
Reply to this message...
cguthri mc (VIP)
Hello? Is anyone from Microsoft going to respond to my post?
HttpWebRequest
is behaving differently after installing the SP1 for .NET. It keeps getting
zero windows when it tries to receive a response from a web page.
Reply to this message...
Alvin Bruney [MVP]
no, this is public forum. there is no obligation. if you feel the issue is a
bug, report it as a bug using this link
http://support.microsoft.com/default.aspx?scid=fh
;[ln];oasoem
--
Regards,
Alvin Bruney
[ASP.NET MVP
http://mvp.support.microsoft.com/default.aspx
]
Got tidbits? Get it here...
http://tinyurl.com/27cok
"cguthri_mc" <
Click here to reveal e-mail address
> wrote in message
news:
Click here to reveal e-mail address
...
[Original message clipped]
Reply to this message...
cguthri mc (VIP)
I see, I had already tried this route but they do not have .NET as an option.
When I did try to go through the process using Visual Studio .NET 2003 as
the product to report on it hung between form posts at one point and after
waiting an hour I gave up and closed the process. When I found this I
figured it was moderated my Microsoft, my mistake. I will try to go through
the support forms again and maybe this time IE will not hang between forms.
"Alvin Bruney [MVP]" wrote:
[Original message clipped]
Reply to this message...
Jochen Kalmbach
=?Utf-8?B?Y2d1dGhyaV9tYw==?= wrote:
[Original message clipped]
Maybe this is the reason:
HTTP response split attacks,
HttpWebRequest
and the NET Framework 1.1 SP1
http://blogs.msdn.com/gzunino/archive/2004/09/05/225881.aspx
--
Greetings
Jochen
My blog about Win32 and .NET
http://blog.kalmbachnet.de/
Reply to this message...
cguthri mc (VIP)
AHA! That did it! Woohoo! My business is saved. Thanks for that post, but
adding the content to the .config file works and all that for now, but is
there any sort of "real" solution that could be implemented server side to
fix this? Are our servers doing something wrong and need to be updated?
"Jochen Kalmbach" wrote:
[Original message clipped]
Reply to this message...
cguthri mc (VIP)
Ahh.... the was indeed a dash left out of a custom http header. That was the
cause of this whole mess. Okay, time to wrestle with the server admins.
Thanks for all your help!
"cguthri_mc" wrote:
[Original message clipped]
Reply to this message...
System.IO.StreamReader
System.Net.HttpWebRequest
System.Net.HttpWebResponse
System.Net.WebRequest
System.Text.Encoding
Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us
-
Terms of Use
-
Privacy Policy
-
www.dotnet247.com