XML and EOF

Discussion in 'ASP .Net' started by Elroyskimms, May 14, 2005.

  1. Elroyskimms

    Elroyskimms Guest

    I'm not sure if this issue is related to XML or it is strictly ASP.Net,
    so I apologize if I have cross-posted incorrectly.

    I have an ASP.Net page (written with VB.Net) that returns XML in
    response to various parameters that are passed to it. Here is a
    simplified version of the code where the problem lies:

    Response.Clear()
    Response.ContentType = "text/xml"
    Response.Write(MyXMLString)
    Response.Flush()
    Response.Close()

    The XML is properly displayed if I view the page in a browser window
    and pass the name/value pairs through the querystring. The problem
    occurs when other systems attempt to access the page via HTTP POST.
    Their content is POST'ed correctly. All processing on the page happens
    correctly, but when I return the XML content, the client program (not a
    browser) returns an error message:
    500 EOF when chunk header expected

    Is it related to how I am closing the response stream?
    Am I not closing the response stream properly?

    Is there some character string that signifies EOF for XML (other than
    closing the root element)?
    How do I signal EOF when I am done sending the XML content.
     
    Elroyskimms, May 14, 2005
    #1
    1. Advertising

  2. Elroyskimms wrote:

    > I'm not sure if this issue is related to XML or it is strictly ASP.Net,
    > so I apologize if I have cross-posted incorrectly.
    >
    > I have an ASP.Net page (written with VB.Net) that returns XML in
    > response to various parameters that are passed to it. Here is a
    > simplified version of the code where the problem lies:
    >
    > Response.Clear()
    > Response.ContentType = "text/xml"
    > Response.Write(MyXMLString)
    > Response.Flush()
    > Response.Close()
    >
    > The XML is properly displayed if I view the page in a browser window
    > and pass the name/value pairs through the querystring. The problem
    > occurs when other systems attempt to access the page via HTTP POST.
    > Their content is POST'ed correctly. All processing on the page happens
    > correctly, but when I return the XML content, the client program (not a
    > browser) returns an error message:
    > 500 EOF when chunk header expected
    >
    > Is it related to how I am closing the response stream?
    > Am I not closing the response stream properly?
    >
    > Is there some character string that signifies EOF for XML (other than
    > closing the root element)?
    > How do I signal EOF when I am done sending the XML content.


    I think the error message says that end of file is found while not being
    expected, the client is looking for a chunk header which probably means
    that the whole response is sent in chunks of data. So the client is
    probably looking for a new chunk indicated by a chunk header while the
    server finishes the response. Why that happens is hard to say but I
    don't think it is XML specific, more a HTTP communication problem
    between your client code and the ASP.NET server side code.


    --

    Martin Honnen --- MVP XML
    http://JavaScript.FAQTs.com/
     
    Martin Honnen, May 14, 2005
    #2
    1. Advertising

  3. Use Response.End()



    --
    2004 and 2005 Microsoft MVP C#
    Robbe Morris
    http://www.robbemorris.com
    http://www.masterado.net



    "Elroyskimms" <> wrote in message
    news:...
    > I'm not sure if this issue is related to XML or it is strictly ASP.Net,
    > so I apologize if I have cross-posted incorrectly.
    >
    > I have an ASP.Net page (written with VB.Net) that returns XML in
    > response to various parameters that are passed to it. Here is a
    > simplified version of the code where the problem lies:
    >
    > Response.Clear()
    > Response.ContentType = "text/xml"
    > Response.Write(MyXMLString)
    > Response.Flush()
    > Response.Close()
    >
    > The XML is properly displayed if I view the page in a browser window
    > and pass the name/value pairs through the querystring. The problem
    > occurs when other systems attempt to access the page via HTTP POST.
    > Their content is POST'ed correctly. All processing on the page happens
    > correctly, but when I return the XML content, the client program (not a
    > browser) returns an error message:
    > 500 EOF when chunk header expected
    >
    > Is it related to how I am closing the response stream?
    > Am I not closing the response stream properly?
    >
    > Is there some character string that signifies EOF for XML (other than
    > closing the root element)?
    > How do I signal EOF when I am done sending the XML content.
    >
     
    Robbe Morris [C# MVP], May 15, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Kobu
    Replies:
    10
    Views:
    627
    Keith Thompson
    Mar 4, 2005
  2. SpreadTooThin
    Replies:
    1
    Views:
    338
    James Kanze
    Jun 8, 2007
  3. SpreadTooThin

    ifstream eof not reporting eof?

    SpreadTooThin, Jun 13, 2007, in forum: C++
    Replies:
    10
    Views:
    697
    James Kanze
    Jun 15, 2007
  4. Jan Burse
    Replies:
    67
    Views:
    1,066
    Jan Burse
    Mar 14, 2012
  5. Erik Wasser
    Replies:
    5
    Views:
    465
    Peter J. Holzer
    Mar 5, 2006
Loading...

Share This Page