473,387 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

protocol violation - httpwebrequest

Hi.
I have problem : The server committed a protocol violation.
Section=ResponseStatusLine - exeption.
in code:

--------------------------------------------------------------------------------------------------<code>
String server = "http://nyc.etn.fm:80/stream/1077";
request = (HttpWebRequest)WebRequest.Create(server);
request.Headers.Clear();
request.ProtocolVersion = new Version("1.0");
request.Headers.Add("Icy-MetaData", "1");
request.UserAgent = "WinampMPEG/5.09";
request.KeepAlive = false;
response = (HttpWebResponse) request.GetResponse();
---------------------------------------------------------------------------------------------------
</code>
The server requests with ICY 200 so everything should be ok i guess:
here is the answer:
GET /stream/1077 HTTP/1.0
Icy-MetaData: 1
User-Agent: WinampMPEG/5.09
Host: nyc.etn.fm

ICY 200 OK
icy-notice1: <BR>This stream requires <a
href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2: SHOUTcast Distributed Network Audio Server/SolarisSparc
v1.9.5<BR>
icy-name: ETN.FM Progressive Channel
icy-genre: Progressive Trance, House, Dance, Chill Out, Ambient
icy-url: http://www.etn.fm
icy-pub: 1
icy-metaint: 8192
icy-br: 192
icy-irc: #shoutcast
icy-icq: 0
icy-aim: N/A
WINAMP correct request is similar:
GET /stream/1077 HTTP/1.0
Host: 64.236.34.196
User-Agent: WinampMPEG/5.09
Accept: */*
Icy-MetaData:1
Connection: close

ICY 200 OK
icy-notice1: <BR>This stream requires <a
href="http://www.winamp.com/">Winamp</a><BR>
icy-notice2: SHOUTcast Distributed Network Audio Server/SolarisSparc
v1.9.5<BR>
icy-name: ETN.FM Progressive Channel
icy-genre: Progressive Trance, House, Dance, Chill Out, Ambient
icy-url: http://www.etn.fm
icy-pub: 1
icy-metaint: 8192
icy-br: 192
icy-irc: #shoutcast
icy-icq: 0
icy-aim: N/A
Why the exception occurs?
For any help - thanks.
PK
Nov 17 '05 #1
1 7444
Ok i figured it out.

For others:
<system.net>
<settings>
<httpWebRequest useUnsafeHeaderParsing = "true" />
</settings>
</system.net>
in application config file.
Nov 17 '05 #2

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

Similar topics

5
by: Henrik | last post by:
Hi, I am trying to read some industrial webservers using the HTTP/CGI webequest like this: wrs = (HttpWebRequest)WebRequest.Create(HTTP/CGI-string); mwst = (HttpWebResponse wrs.GetResponse();...
0
by: Helen | last post by:
Hi, I am trying to use a .Net WebClient object to read data from a url, but I am getting the following error: System.Net.HttpWebRequest.CheckFinalStatus()...
3
by: sumit | last post by:
Hi, I am trying to send an XML request from ASPX page to A servlet,,,and gets the XML response back. I am using HttpWebRequest object. It throws exception as: The underlying connection was...
1
by: Dan W. | last post by:
Does anyone have any experience with this problem. I am trying to post about 20 fields of information to another server using System.Net.WebClient.UploadData. This works fine for some servers but...
7
by: Tom | last post by:
Hello all: I have a method that does a POST to a secured website using HttpWebRequest. It worked when logging in the site, but it failed with an HTTP prococol violation error when it is used to...
1
by: Khadim | last post by:
I m using HTTWebResponse which is running smoothly on my system which is behing a proxy server. When I run the application with Live IP it gives "HTTP Protocol violation error" I can't use...
0
by: Kris Mattheus | last post by:
A little background: I've been using web services successfully for a while now. My web server is a Windows CE 4.2 device and my client is a windows C# application created with Visual Studio 2003....
3
by: Scott McDermott | last post by:
I have an application that is making an HTTP request with HttpWebRequest.GetRequest. Unless I set 'httpWebRequest useUnsafeHeaderParsing="true"' in the web.config, I get a 'The server committed a...
0
by: Edwardseok | last post by:
Hello All, I am making VB.NET application program to read data from other equipment. The following is my code.(VB2005.NET) ---------------code -------------------------- Private Sub...
0
by: oriol.ardevol | last post by:
Hi, I have an asp.net application that connects through an HttpWebRequest object to a ISAPI dll in a server. This isapi dll has some different method calls. What I do is calling the different...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...

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.