As for sample scripts, all of my scripts are not publicly accessible, but even the simplest ones will cause ASP.NET 2.0 to complain when it tries to read the response.
<% Response.Write("Hello, world") %>
Your mention of html_out has led me to somewhat of a solution.
Adding the following line at the end of my FoxWeb scripts allows them to work correctly with ASP.NET 2.0:
html_out = "Status: 200 OK" + CHR(13) + CHR(10) + CHR(13) + CHR(10) + Response.OutputBuffer
Sent by FoxWeb Support on 06/16/2006 11:06:16 AM:
Ah, now I understand what you meant by ASP integration. FoxWeb uses either CR LF, or just LF as newline characters in HTTP headers -- at least when these headers are created with the Response object. As far as I know, both options are valid.
The error message indicates that the response header contains CR characters by themselves, which apparently ASP.Net 2.0 doesn't like. I don't think this is possible with FoxWeb, but I may be wrong. Do your FoxWeb scripts use html_out to return data, or do they use the Response object?
Also, are your FW scripts available over the Internet? If they are, we can examine their response in a binary editor.
Sent by Brent Roberts on 06/16/2006 07:00:48 AM:
I am using IIS 6, FoxWeb 3.3, and ASP.NET 2.0.50727. ASP.NET is the new web development model for my organization; however we have a large library of FoxWeb scripts that we would like to continue using rather than rewriting them.
The FoxWeb scripts perform black-box functions such as FoxPro database queries/updates, interface to third-party authentication systems, manage security lists, send e-mail notifications to distribution lists, etc. Calling these FoxWeb scripts from a web browser such as IE6, IE7, FireFox 1.5, or HTTP socket libraries from inside a FoxPro application all work fine. Everything works as expected with ASP.NET 1.1 web pages as well. It wasn't until ASP.NET 2.0 that the problems started occuring.
The code in the ASP.NET 2.0 pages that is breaking looks something like this:
req = HttpWebRequest.Create("http://dev.server/foxweb.fwx?form_id=notify&appcode=register")resp = req.GetResponse()
Some people have suggested that I modify the web.config file for ASP.NET but this doesn't seem to work.
I realize this might be a bug in ASP.NET or a server misconfiguration that is unrelated to FoxWeb, but I'm curious if FoxWeb is indeed sending a CRLF after each of the response headers that it sends.
Sent by FoxWeb Support on 06/15/2006 06:11:58 PM:
What do you mean by "interfacing with a FoxWeb script?" Can you please describe your system? Are you using ASP.Net scripts, or are you simply using a .Net-enabled version of IIS with FoxWeb?
Sent by Brent Roberts on 06/15/2006 05:31:24 AM:
I have a ASP.NET web page that is interfacing to a FoxWeb script. Starting with ASP.NET 2.0, I am now getting this error message from the ASP interpreter, regardless of the FoxWeb script being called:From what I can tell, ASP.NET 2.0 is now enforcing more stringent header tests, and this might be an issue with how FoxWeb is sending content back to the web server. Microsoft support suggested making inquiries about compliance with RFC 822 and 2616.
The server committed a protocol violation. Section=ResponseHeader Detail=CR must be followed by LF
Any help you can give would be appreciated.