473,729 Members | 2,150 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

HttpRequest (well known by now..) error

Hi,

does anybody have found a working solution for this HttpRequest error :
"ServerProtocol Violation/The server committed a protocol violation.
Section=Respons eStatusLine"

i tried the solution regarding the app.config file, by puting there the
following

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.net>
<settings>
<httpWebReque st useUnsafeHeader Parsing = "true" />
</settings>
</system.net>
</configuration>

on the client (and the server that is runnign an http server software)
but i keep getting the same message...
Thanks a lot for any help
Jun 22 '06 #1
4 4374
The documentation for the UseUnsafeHeader Parsing property on the
HttpWebRequestE lement states the following:

Header names cannot have non-ASCII chars in them. This validation is
performed whether this property is set to true or false.

I'm assuming that this is the problem that you are facing. It's really
an error on the server's part, and that is the area where it should be
fixed.

You might have to resort to parsing the headers/etc, etc yourself.
Either that, or use another third party provider (perhaps IP works).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"objectref" <an******@media trel.com> wrote in message
news:us******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

does anybody have found a working solution for this HttpRequest error :
"ServerProtocol Violation/The server committed a protocol violation.
Section=Respons eStatusLine"

i tried the solution regarding the app.config file, by puting there the
following

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.net>
<settings>
<httpWebReque st useUnsafeHeader Parsing = "true" />
</settings>
</system.net>
</configuration>

on the client (and the server that is runnign an http server software)
but i keep getting the same message...
Thanks a lot for any help

Jun 22 '06 #2
Thanks for the reply!

I initialize a stream writer on the server part to write something on the
socet that took the http request.
You mean that is something there that is not correct ?
Thanks again..

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:OV******** ******@TK2MSFTN GP04.phx.gbl...
The documentation for the UseUnsafeHeader Parsing property on the
HttpWebRequestE lement states the following:

Header names cannot have non-ASCII chars in them. This validation is
performed whether this property is set to true or false.

I'm assuming that this is the problem that you are facing. It's really
an error on the server's part, and that is the area where it should be
fixed.

You might have to resort to parsing the headers/etc, etc yourself.
Either that, or use another third party provider (perhaps IP works).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"objectref" <an******@media trel.com> wrote in message
news:us******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

does anybody have found a working solution for this HttpRequest error :
"ServerProtocol Violation/The server committed a protocol violation.
Section=Respons eStatusLine"

i tried the solution regarding the app.config file, by puting there the
following

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.net>
<settings>
<httpWebReque st useUnsafeHeader Parsing = "true" />
</settings>
</system.net>
</configuration>

on the client (and the server that is runnign an http server software)
but i keep getting the same message...
Thanks a lot for any help


Jun 22 '06 #3
objectref wrote:
Thanks for the reply!

I initialize a stream writer on the server part to write something on the
socet that took the http request.
You mean that is something there that is not correct ?
Thanks again..
Yes, that is probably what is happening.

I some time ago I needed to connect to a web service that returned no
headers at all, just the content. I ended up writing a HTTP request
directly to a tcp connection and reading the results. The
HttpRequest/Response classes in .Net are *very* strict when it comes to
the actual protocol.

You should not that the HTTP protocol is quite complex. The easiest
solution is to host your application in IIS as an ASP.net application so
that it can offload all the protocol stuff from you. But if that is not
possible, then have a look at the System.Net.Http Listener class instead
of rolling your own solution on the server side.

Kind regards,

Jesse Houwing
"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote in
message news:OV******** ******@TK2MSFTN GP04.phx.gbl...
The documentation for the UseUnsafeHeader Parsing property on the
HttpWebRequestE lement states the following:

Header names cannot have non-ASCII chars in them. This validation is
performed whether this property is set to true or false.

I'm assuming that this is the problem that you are facing. It's really
an error on the server's part, and that is the area where it should be
fixed.

You might have to resort to parsing the headers/etc, etc yourself.
Either that, or use another third party provider (perhaps IP works).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"objectref" <an******@media trel.com> wrote in message
news:us******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

does anybody have found a working solution for this HttpRequest error :
"ServerProtocol Violation/The server committed a protocol violation.
Section=Respons eStatusLine"

i tried the solution regarding the app.config file, by puting there the
following

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.net>
<settings>
<httpWebReque st useUnsafeHeader Parsing = "true" />
</settings>
</system.net>
</configuration>

on the client (and the server that is runnign an http server software)
but i keep getting the same message...
Thanks a lot for any help


Jun 23 '06 #4

Hey Jesse,

thanks for the help!

The funny thing is that the app is relatevely simple and it is
a clasic windows applicatio.
Socket opens, send data and receive data, just like you describe.
objectref
"Jesse Houwing" <je***********@ nospam-sogeti.nl> wrote in message
news:uj******** ******@TK2MSFTN GP03.phx.gbl...
objectref wrote:
Thanks for the reply!

I initialize a stream writer on the server part to write something on the
socet that took the http request.
You mean that is something there that is not correct ?
Thanks again..


Yes, that is probably what is happening.

I some time ago I needed to connect to a web service that returned no
headers at all, just the content. I ended up writing a HTTP request
directly to a tcp connection and reading the results. The
HttpRequest/Response classes in .Net are *very* strict when it comes to
the actual protocol.

You should not that the HTTP protocol is quite complex. The easiest
solution is to host your application in IIS as an ASP.net application so
that it can offload all the protocol stuff from you. But if that is not
possible, then have a look at the System.Net.Http Listener class instead of
rolling your own solution on the server side.

Kind regards,

Jesse Houwing

"Nicholas Paldino [.NET/C# MVP]" <mv*@spam.guard .caspershouse.c om> wrote
in message news:OV******** ******@TK2MSFTN GP04.phx.gbl...
The documentation for the UseUnsafeHeader Parsing property on the
HttpWebRequestE lement states the following:

Header names cannot have non-ASCII chars in them. This validation is
performed whether this property is set to true or false.

I'm assuming that this is the problem that you are facing. It's
really an error on the server's part, and that is the area where it
should be fixed.

You might have to resort to parsing the headers/etc, etc yourself.
Either that, or use another third party provider (perhaps IP works).

Hope this helps.

--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard. caspershouse.co m

"objectref" <an******@media trel.com> wrote in message
news:us******** ******@TK2MSFTN GP04.phx.gbl...
Hi,

does anybody have found a working solution for this HttpRequest error :
"ServerProtocol Violation/The server committed a protocol violation.
Section=Respons eStatusLine"

i tried the solution regarding the app.config file, by puting there the
following

<?xml version="1.0" encoding="utf-8" ?>
<configuratio n>
<system.net>
<settings>
<httpWebReque st useUnsafeHeader Parsing = "true" />
</settings>
</system.net>
</configuration>

on the client (and the server that is runnign an http server software)
but i keep getting the same message...
Thanks a lot for any help


Jun 23 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
4638
by: HikksNotAtHome | last post by:
In Mozilla 1.4b, when the URL is set to a local URL, it works as expected. function showIt(){ var xmlhttp = new XMLHttpRequest(); xmlhttp.open("GET", "blank.html" ,true); xmlhttp.onreadystatechange=function() { if (xmlhttp.readyState==4) { document.myForm.outputSource.value = xmlhttp.responseText; } }
0
1406
by: Bp | last post by:
I'm writing a simple HTTPRequest that retrieves the content of a web page. Dim httpReq As System.Net.HttpWebRequest Dim httpResp As System.Net.HttpWebResponse httpReq = CType(System.Net.WebRequest.Create(URLString), System.Net.HttpWebRequest) httpResp = CType(httpReq.GetResponse(), System.Net.HttpWebResponse) The problem is that on certain pages, I get a WebException of "The remote
4
7402
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird. Unfortunately, Internet Explorer doesn't quite work as expected -- it gives me an "invalid argument" error that I don't know how to fix. Here's the entire script, with form, annotated to explain what I'm doing and where the problem is occurring. I...
4
11572
by: Daniel Rimmelzwaan | last post by:
I am having trouble getting the XML out of an HttpRequest object. I am sending the XML from biztalk into my aspx page, after which I want to take the XML out of it and process it using a MSXML.DOMDocument. I understand that in the Request object, it is stored as a binary, and I can't figure out how to translate it into a text string. Do I need to read it into a byte variable and then move it to the DOMDocument, or is there a method I...
1
4886
by: Mark Miller | last post by:
I just recently started getting the above error on a page I am posting MULTIPART/FORM-DATA. We have SoftArtisans FileUp component and Filter installed on the server in question and up until a day or so ago everything was working fine. I honestly can't remember changing anything since it was last working. But I tried reinstalling the .Net Framework along w/ the service pack, which didn't work. I also had v1.1 already installed but I hadn't...
19
2114
by: Bill Cohagan | last post by:
I'm constructing an ASP page that I'd like to test by writing a program that simulates "many" users hitting the submit button on a form. I assume it's possible to manually construct an httprequest object, but the docs are more oriented towards using one that already exists. Am I on the right track or is there an easier way? In my case the Form to be submitted has a couple of hundred fields and what I want to do is access a database with...
1
2024
by: Gunnar | last post by:
I am finding some unusual behavior with techniques I am using to show/hide/update data without having to refresh the page. I'm quite sure it's developer ignorance on my part and would be grateful for any suggestions. My page has 10 tables with their visibility controlled by the user making a menu selection. For example, selecting menu_1 calls a function which displays table_1 by setting table_1's style display: block and hides tables...
1
2846
by: Jeff | last post by:
ASP.NET 2.0 I'm about to program a HttpRequest from my asp.net 2.0 website. I'll request another server using HttpRequest and ask if password etc are okay.... So I've looked into the HttpRequest constructors and cannot see how to use it. public HttpRequest ( string filename, string url,
2
1604
by: =?Utf-8?B?SHVzYW0=?= | last post by:
Hi EveryBody: I want to add HttpRequest class to my windows application, I add the System.Web.dll to my project as refreance . but I still get the blue Line under HttpReqesut class as error. Some body can help me or redirect me to do it right? any help will be appreciated
0
8913
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9426
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9280
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9142
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6722
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6016
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4525
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2162
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.