tags:

views:

128

answers:

1

Let me explain better than what the question state. I dynamically generate a KML file from an aspx page and use routing to change the url so I can access myapp.com/mykml.kml and the download starts. I use Response.write() in the aspx page to send the data and it work flawlessly. But there is a zipped version for KML files which is KMZ and I am wondering if I can still use my aspx page to serve a KMZ instead of a KML. Since I do not use a file I cannot "zip" it. Is there a way to zip the stream and output it in the Response.Write()?

+1  A: 

Yes, you can: ASP.NET - Create Google Earth .kmz files dynamically using in-memory streams and #ziplib

Rubens Farias
Well wasn't expecting this to have a blog entry somewhere. Sorry I didn't search better. Blog entry talk about impossibility to do it witout a library. Does .NET 3.5 have the ability to PKZip?
lucian.jp
Yes and No. You can use System.IO.Packaging to create a zip file, but it will lead to insomnia, headaches, nausea, and hair loss. Better to use a 3rd party library.
Cheeso