R
Rob Nicholson
The following code added to Page_Load works a treat:
Response.ContentType = "application/zip"
Response.AppendHeader("Content-Disposition", "attachment;
filename=DesktopChange.pdf")
Response.WriteFile("C:\Inetpub\wwwroot\Download\DesktopChange.pdf")
Response.Flush()
But *only* if the document exists in the web site or is accessible by the
ASPNET account. However, it fails if the document is stored on the network,
e.g. s:\temp\desktopchange.pdf. This isn't surprising as the ASPNET can't
access s:\Temp.
One workaround we've though of is using the upload file functionality to
upload from the client to the server into a temporary file and then serve up
this temporary file.
But this requires an upload and a download which is waste.
Anyone got any ideas how to solve this?
Cheers, Rob.
Response.ContentType = "application/zip"
Response.AppendHeader("Content-Disposition", "attachment;
filename=DesktopChange.pdf")
Response.WriteFile("C:\Inetpub\wwwroot\Download\DesktopChange.pdf")
Response.Flush()
But *only* if the document exists in the web site or is accessible by the
ASPNET account. However, it fails if the document is stored on the network,
e.g. s:\temp\desktopchange.pdf. This isn't surprising as the ASPNET can't
access s:\Temp.
One workaround we've though of is using the upload file functionality to
upload from the client to the server into a temporary file and then serve up
this temporary file.
But this requires an upload and a download which is waste.
Anyone got any ideas how to solve this?
Cheers, Rob.