Re: Downloading/opening file in client application window
- From: "Sambathraj" <v_sambath_raj@xxxxxxxxxxx>
- Date: Thu, 12 May 2005 18:22:04 +0530
Hi,
Assuming that you are running on Windows2003, in order that aps.net to
access the netowork resources, service should be running under network
service acount. also the folder being accessed should be configured to allow
the netowrk service account.
Regards
Sambathraj
"Rob Nicholson" <informed@xxxxxxxxxxxxxxxx> wrote in message
news:eM1PjntVFHA.2960@xxxxxxxxxxxxxxxxxxxxxxx
> 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.
>
>
.
- References:
- Downloading/opening file in client application window
- From: Rob Nicholson
- Downloading/opening file in client application window
- Prev by Date: Re: link data grid edit button
- Next by Date: SqlCommandBuilder
- Previous by thread: Re: Downloading/opening file in client application window
- Next by thread: System.Web.UI.HtmlTextWriter
- Index(es):