You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
743 B
C#
34 lines
743 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.IO;
|
|
|
|
namespace NetWorkHard.GlobalAshx
|
|
{
|
|
/// <summary>
|
|
/// AjaxFileStream 的摘要说明
|
|
/// </summary>
|
|
public class AjaxFileStream : IHttpHandler
|
|
{
|
|
|
|
public void ProcessRequest(HttpContext context)
|
|
{
|
|
StreamReader sr=new StreamReader(context.Request.InputStream);
|
|
string Content = sr.ReadToEnd();
|
|
string FileName = Guid.NewGuid().ToString();
|
|
string path = AppDomain.CurrentDomain.BaseDirectory + "ServerCookies/" + FileName;
|
|
File.WriteAllText(path, Content);
|
|
context.Response.Write("ServerCookies/" + FileName);
|
|
context.Response.End();
|
|
}
|
|
|
|
public bool IsReusable
|
|
{
|
|
get
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
}
|
|
} |