IIS ASP - Problem viewing compressed(zip) XML in browser(IE)

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > August 2006 > Problem viewing compressed(zip) XML in browser(IE)





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Problem viewing compressed(zip) XML in browser(IE)
ms.coding@gmail.com

2006-08-25, 7:27 pm

I received a huge compressed-xml file from server and want to display
that in bowser (IE). I believe it's doable by just manipulating
Response object header. The error I get is "xml document must have top
level element". I could open this compressed xml in winzip. So
compressing part looks good. It's well formmed XML so the error realted
to tag is not making sense to me.

Here is my ASP page code>>>>>>...

' this class method takes file ..compresses it and send it back as
binary array(binay[])
' so result variable has content of type binay[]

MyObjectname.GetZippedXml fileName, result
Response.Clear
Response.ContentType = "text/xml"
Response.AddHeader "Content-Encoding", "gzip"
Response.BinaryWrite result

When I put content of "result" variable in file and viewed it in
winzip, it showed expected result. It means "result" varaible has valid
compressed xml coming from GetZippedXml method. According to me issue
is somewhere in setting Response object header. Is there any tweak to
work with binarywrite and response object?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com