- From: Mehmet Erdal ÖZKINACI <erdalmehmet@gmail.com>
- Date: Wed, 1 Dec 2010 10:45:52 +0200
- To: "'Tatham Oddie'" <tatham@oddie.com.au>, <www-validator@w3.org>
- Message-ID: <001701cb9134$2a8b4bd0$7fa1e370$@com>
Tatham, Problem is not about my local validator app or IIS, it is working properly. I think problem is downloaded file extention and content compatibility problem which is "pl" extention and "xml" content conflict. On Apache server file name "check" is ok (working), but on IIS server extention needs to be known. For this reason, I changed file name "check" with "check.pl". Below code throws exception because of file name changed at least I think. Sample code below: ------------------------------------- public static void Validate() { string url = "http://localhost/HtmlValidator/htdocs/check.pl?uri=" + "http://www.milliyet.com.tr" + "&output=soap12"; XDocument urlDocument = XDocument.Load(url); Console.Write(urlDocument.ToString()); Console.Read(); } static void Main(string[] args) { Validate(); } ------------------------------------- Error: --------------------------------------- System.Net.WebException was unhandled Message="The server committed a protocol violation. Section=ResponseHeader Detail=Header name is invalid" ------------------------------------------ After I investigated check.pl perl script, I found that line 820 print Encode::encode('UTF-8', $template->output); code return result. May be this line can be changed to solve my problem, but I do not know perl. May be I am wrong. Finally, how can I change return file name from "check.pl" to "check.xml" or get rid of above error and which way? Thanks in advance.. From: Tatham Oddie [mailto:tatham@oddie.com.au] Sent: Wednesday, December 01, 2010 7:10 AM To: Mehmet Erdal ÖZKINACI; www-validator@w3.org Subject: RE: Validator Api Problem On IIS Mehmet, Can you capture a wire level trace using either IIS Failed Request Tracing, Fiddler or Wireshark? If you're unsure of how to achieve this, ping me off list and I'll help you out. -- Tatham Oddie au mob: +61 414 275 989, us cell: +1 213 280 9140, skype: tathamoddie If you're printing this email, you're doing it wrong. This is a computer, not a typewriter. From: www-validator-request@w3.org [mailto:www-validator-request@w3.org] On Behalf Of Mehmet Erdal ÖZKINACI Sent: Wednesday, 1 December 2010 11:23 AM To: www-validator@w3.org Subject: Re: Validator Api Problem On IIS It works on IIS by using gui but, it is not work by using API. When I request "http://localhost/HtmlValidator/htdocs/check.pl?uri=" + "http://www.milliyet.com.tr" + "&output=soap12" With browser it response with a file check.pl and then I open it and see it is an xml file. However, when I use api with same url and query strings it returns below error. I think that confusion is file name extension "pl" and response content type "Content-Type: application/soap+xml", they are different. Is there any help? Thanks.. System.Net.WebException was unhandled Message="The server committed a protocol violation. Section=ResponseHeader Detail=Header name is invalid" Source="System" StackTrace: konum: System.Net.HttpWebRequest.GetResponse() konum: System.Xml.XmlDownloadManager.GetNonFileStream(Uri uri, ICredentials credentials) konum: System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) konum: System.Xml.XmlReader.Create(String inputUri, XmlReaderSettings settings, XmlParserContext inputContext) konum: System.Xml.Linq.XDocument.Load(String uri, LoadOptions options) konum: ConsoleApplication1.Program.Validate() C:\Users\Erdal\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs içinde: satýr 22 konum: ConsoleApplication1.Program.Main(String[] args) C:\Users\Erdal\Documents\Visual Studio 2008\Projects\ConsoleApplication1\ConsoleApplication1\Program.cs içinde: satýr 43 konum: System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) konum: Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() konum: System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) konum: System.Threading.ThreadHelper.ThreadStart() InnerException:
Received on Wednesday, 1 December 2010 08:46:34 UTC