Click here to Skip to main content
15,891,513 members
Home / Discussions / C#
   

C#

 
GeneralRe: Passing parameters from aspx to code behind file. Pin
Christian Graus27-May-05 2:45
protectorChristian Graus27-May-05 2:45 
GeneralRe: Passing parameters from aspx to code behind file. Pin
Phillip H. Blanton27-May-05 3:23
Phillip H. Blanton27-May-05 3:23 
QuestionHow does one know the Screen Point of a MenuItem when it is drawn using OwnerDrawn true? Pin
Don Ashworth26-May-05 11:35
Don Ashworth26-May-05 11:35 
AnswerRe: How does one know the Screen Point of a MenuItem when it is drawn using OwnerDrawn true? Pin
Marc Clifton26-May-05 15:52
mvaMarc Clifton26-May-05 15:52 
GeneralRe: How does one know the Screen Point of a MenuItem when it is drawn using OwnerDrawn true? Pin
Don Ashworth27-May-05 4:09
Don Ashworth27-May-05 4:09 
GeneralRe: How does one know the Screen Point of a MenuItem when it is drawn using OwnerDrawn true? Pin
Marc Clifton27-May-05 6:20
mvaMarc Clifton27-May-05 6:20 
GeneralRe: How does one know the Screen Point of a MenuItem when it is drawn using OwnerDrawn true? Pin
Don Ashworth27-May-05 7:13
Don Ashworth27-May-05 7:13 
GeneralHandling Bad HTTP server responses Pin
crc102426-May-05 11:26
crc102426-May-05 11:26 
Hello,

I'm trying to retrieve a page from a webserver, but I keep getting a "The server committed a protocol violation. Section=ResponseStatusLine" error in my program. This is using a the very simple code below:

<br />
string hostURL = "http://patft.uspto.gov";<br />
string URLSuffix = "/netacgi/nph-Parsernetacgi/" + "nph-Parser?Sect1=PTO1&Sect2=HITOFF&d=PALL&p=1" + "&u=/netahtml/srchnum.htm&r=1&f=G&l=50&" + "s1=6223224.WKU.&OS=PN/6223224&RS=PN/6223224";<br />
 <br />
string lcUrl = hostURL + URLSuffix;<br />
// *** Establish the request<br />
HttpWebRequest webrequest =<br />
    (HttpWebRequest)WebRequest.Create(lcUrl);<br />
// *** Set properties<br />
webrequest.Timeout = 10000;     // 10 secs<br />
webrequest.UserAgent = "Code Sample Web Client";<br />
webrequest.ContentType = "text/html";<br />
webrequest.AllowAutoRedirect = true;<br />
<br />
// *** Retrieve request info headers<br />
HttpWebResponse loWebResponse = HttpWebResponse)webrequest.GetResponse();<br />
Encoding enc = Encoding.GetEncoding(1252);  // Windows default Code Page<br />
StreamReader loResponseStream =<br />
           new StreamReader(loWebResponse.GetResponseStream(), enc);<br />
string lcHtml = loResponseStream.ReadToEnd();<br />
<br />
loWebResponse.Close();<br />
loResponseStream.Close();<br />


The problem appears, via HTTP trace, that the server is returning a code "200 Script results follow". I also downloaded the HTTP sniffer from The Code Project (HTTPeep) which did not function (threw off same error). Linux wget chokes as well.

Is there any way to force the program to treat that server code as a "200 OK" code, or to otherwise ignore it?

Thanks in advance,
Colin
GeneralDataTable's ever changing row index Pin
fuzzlog26-May-05 8:15
fuzzlog26-May-05 8:15 
GeneralRe: DataTable's ever changing row index Pin
pubududilena26-May-05 19:55
pubududilena26-May-05 19:55 
GeneralRe: DataTable's ever changing row index Pin
Anonymous26-May-05 20:05
Anonymous26-May-05 20:05 
GeneralRe: DataTable's ever changing row index Pin
pubududilena26-May-05 20:40
pubududilena26-May-05 20:40 
GeneralUsing custom controls. Pin
Nick Z.26-May-05 7:29
Nick Z.26-May-05 7:29 
GeneralRe: Using custom controls. Pin
Christian Graus26-May-05 14:25
protectorChristian Graus26-May-05 14:25 
GeneralRe: Using custom controls. Pin
Nick Z.26-May-05 14:40
Nick Z.26-May-05 14:40 
Questionhow to send a packet to device , the simplest way? Pin
jinzhecheng26-May-05 7:12
jinzhecheng26-May-05 7:12 
AnswerRe: how to send a packet to device , the simplest way? Pin
Phillip H. Blanton26-May-05 13:04
Phillip H. Blanton26-May-05 13:04 
QuestionCareer in 2005 + n? Pin
WDI26-May-05 6:30
WDI26-May-05 6:30 
AnswerRe: Career in 2005 + n? Pin
Judah Gabriel Himango26-May-05 7:13
sponsorJudah Gabriel Himango26-May-05 7:13 
AnswerRe: Career in 2005 + n? Pin
Anonymous27-May-05 16:31
Anonymous27-May-05 16:31 
QuestionHow to retrieve Image from access Database Pin
eng.mohamed26-May-05 5:55
eng.mohamed26-May-05 5:55 
AnswerRe: How to retrieve Image from access Database Pin
Judah Gabriel Himango26-May-05 9:13
sponsorJudah Gabriel Himango26-May-05 9:13 
GeneralOdbcDataReader!! Pin
trk_wakil26-May-05 5:04
trk_wakil26-May-05 5:04 
GeneralRe: OdbcDataReader!! Pin
pubududilena26-May-05 19:34
pubududilena26-May-05 19:34 
Generalsocket handling Pin
cyrus10926-May-05 4:49
cyrus10926-May-05 4:49 

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.