2012-10-09 6 views
0

RSS 피드를 구문 분석하고이를 내 웹 사이트에 표시하려고합니다. 내 코드가 올바르게 작동하는 것 같습니다. techcrunch & arstechnica RSS. 그러나 HackerNews를 구문 분석하려고 시도 할 때 RSS 오류가 발생합니다. ;RSS 구문 분석시 오류

XmlReader readXML; 
    readXML = XmlReader.Create(GetURL()); 
    SyndicationFeed News= SyndicationFeed.Load(readXML); 
    readXML.Close(); 
    return News; 

나는에 되는 ReadXml = XmlReader.Create (가 GetURL()) 다음과 같은 오류가 geturl은 rss의 URL입니다.


서버

에서 프로토콜 위반이 발생했습니다. 제 = ResponseStatusLine


내가 위의 오류를 받고 있어요 왜 어떤 제안이. 감사

+0

가능한 중복 : http://stackoverflow.com/questions/11674938/the-server-committed-a-protocol-violation-section-responsestatusline-when-using http://stackoverflow.com/questions/2482715/the-server-committed-a-protocol-violation-section-respondestatusline-error – sergserg

답변

0

확인이 링크 :

The server committed a protocol violation. Section=ResponseStatusLine

1) 서버를 해결하기 위해 웹 구성 파일에 다음 <httpWebRequest useUnsafeHeaderParsing="true" />을 추가 할 수는 프로토콜 위반

<configuration> 
<system.net> 
<settings> 
<httpWebRequest useUnsafeHeaderParsing="true" /> 
</settings> 
</system.net> 
</configuration> 

2 최선을 다하고 있습니다.)

모든 웹 개발자에게 Skype를 다시 사용하십시오! Tools \ Options \ Connection 대화 상자에서 포트 80 및 443을 사용하는 옵션의 선택을 취소하십시오.

enter image description here

관련 문제