hi
any help,advice,tips etc are greatly appreciated.
i've got an ashx page being called to handle the displaying of an Word doc. -
.NET 2.0, c#, running local on XP Pro
ProcessRequest------------
public void ProcessRequest(HttpContext context)
{
/*
try
{
*/
int userpk = Convert.ToInt32(context.Session["userpk"]);
string cvfilename = context.Request["cvfilename"];
byte[] cv = DAC.GetCVBlob(userpk);
//context.Response.ContentType = "vnd.ms-word";
context.Response.ContentType = "application/octet-stream";
// context.Response.AddHeader("Content-Disposition", cvfilename);
context.Response.ClearContent();
//context.Response.AddHeader("Content-Disposition", cvfilename);
context.Response.AddHeader("Content-Disposition", "inline;filename=" + cvfilename);
context.Response.BinaryWrite(cv);
context.Response.End();
/*
}
catch(Exception e)
{
context.Response.Write(e);
}
*/
}
Now when this runs all is well and i get a prompt asking me if I want to Open, Save, Cancel this doc.
I click Open and the ProcessRequest page is called again, only this time the Session is null like its been abondaned and the page bombs out.
Kind regards
Dean