惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

GbyAI
GbyAI
B
Blog
Stack Overflow Blog
Stack Overflow Blog
量子位
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
T
Tailwind CSS Blog
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
博客园 - 三生石上(FineUI控件)
Recent Announcements
Recent Announcements
U
Unit 42
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
腾讯CDC
D
DataBreaches.Net
Microsoft Azure Blog
Microsoft Azure Blog
G
Google Developers Blog
M
MIT News - Artificial intelligence
P
Proofpoint News Feed
罗磊的独立博客
L
LangChain Blog
V
Visual Studio Blog
雷峰网
雷峰网
aimingoo的专栏
aimingoo的专栏
宝玉的分享
宝玉的分享

博客园 - RubyPDF

content-disposition attachment filename 在Firefox和IE中得到不同的结果 - RubyPDF Google Voice开始发送邀请函 ASP.NET空间使用SQLite遇到的麻烦 PDF数字签名免安装版本发布-Portable PDF Digital Signature(Portable PDF Signer) Dreamhost 开始提供免费空间了 SQLite Manager Sqlite使用中的几点体会。 Thinkpad T60 Fan Error及重新启动windows后画面静止 PdfCrypt 1.0 for Windows 发布 XMP Remover:批量删除PDF 文档的XMP data 软件正版化要靠政府,不能靠国产软件 FCrackZip 1.0 Windows 版本发布 破解MS Word 的只读密码限制 PDFCrack 0.11 Windows 版本发布 Chrome 的又一个bug? 服务器端动态序列化与Unable to generate a temporary class报错 OpenOffice 3增加PDF导入和编辑功能 比尔盖兹在某个大学毕业典礼上的演讲中,对毕业生提出十一项极为睿智的人生建议 在博客页首添加搜索功能
AspSpider 终止提供免费空间服务了。
RubyPDF · 2008-05-19 · via 博客园 - RubyPDF

不知道博客园有多少朋友在使用AspSpider提供的免费空间,这里想给大家提个醒,AspSpider 将在2008年6月1日删除所有空间,需要备份的朋友请赶紧把自己的空间备份转移,以免造成不必要的损失。
似乎这个空间已经不提供备份功能了(更正,找到不能备份的原因了,空间使用较多,如果加上备份文件要超过10M,所以就不给备份了),我尝试了多次都没有成功。如果你也需要备份自己的目录,可以尝试下面这段代码:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using ICSharpCode.SharpZipLib.Zip;
using System.IO;

public partial class packfolder : System.Web.UI.Page
{
    
protected void Page_Load(object sender, EventArgs e)
    
{


        MemoryStream ms 
= new MemoryStream();
        
byte[] buffer;
        
string path = MapPath("");
        
string[] files = Directory.GetFiles(path, "*.*", SearchOption.AllDirectories);
        
using (ZipOutputStream s = new ZipOutputStream(ms))
        
{
            s.SetLevel(
9); // 0-9, 9 being the highest compression
            foreach (string file in files)
            
{
                ZipEntry entry 
= new ZipEntry(file.Substring(path.Length+1));
                entry.DateTime 
= DateTime.Now;
                s.PutNextEntry(entry);
                buffer
=File.ReadAllBytes(file);
                 s.Write(buffer, 
0, buffer.Length);
            }

            s.Finish();

            s.Close();
        }

        buffer 
= ms.ToArray();
        Response.ContentType 
= "application/zip";
        Response.AddHeader(
"Content-disposition""attachment; filename= *.zip");
        Response.OutputStream.Write(buffer, 
0, buffer.Length);
        Response.End();
       
    }

}

这段代码功能很简单,把制定目录和子目录中的文件按照目录结构压缩到zip文件中供下载,这里我是为了方便,直接默认当前文件所在目录了,这样就可以方便下载整个webroot目录了。

这段代码引用了 SharpZipLib
如果你是个懒人,你也可以直接下载这个压缩包上传到你的服务器。
https://files.cnblogs.com/hardrock/packfolder.zip

下面就是我今天登陆后看到的页面提示信息。

AspSpider Free Hosting Termination Notice

It is with deep regret that we inform you that starting May 1, 2008, AspSpider.net will stop offering its free ASP.NET web hosting services. After May 1, 2008, your web sites will remain online for 30 days so that you have the opportunity to download your web site files and seek alternative hosting options. On June 1, 2008, all of our servers will be wiped clean and all web site files will be removed.